-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NOMRG refactor test_models to use pytest #3528
Conversation
|
||
if __name__ == '__main__': | ||
unittest.main() | ||
pytest.main([__file__]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This allows to preserve the use of python tests/test_models.py
Most packages don't do this and just rely on calling pytest
or python -m pytest
from the command line instead of python
.
Codecov Report
@@ Coverage Diff @@
## master #3528 +/- ##
=======================================
Coverage 78.75% 78.75%
=======================================
Files 105 105
Lines 9748 9748
Branches 1565 1565
=======================================
Hits 7677 7677
Misses 1581 1581
Partials 490 490 Continue to review full report at Codecov.
|
@pmeier you might be interested in this. |
For context this is just a POC where I'm trying to showcase the benefits of using |
Closing in favor of #3697 |
Just a small POC
@fmassa, this is how we could factorize
test_models
if we relied onpytest
. In fact we could factorize much more and get rid of theunittest.TestCase
dependency, but this would be more work.