Repository navigation
TST: Switch to pytest - #10842
Merged
Merged
TST: Switch to pytest#10842
Conversation
charris
force-pushed
the
switch-to-pytest
branch
4 times, most recently
from
April 4, 2018 11:41
dbe8231 to
e80a34e
Compare
* Make PytestTester callable. * Rename 'timer' to 'durations', corresponding with pytest. * Offset 'verbose', no entry is now '-q'. * Move some `ignore` warnings into PytestTester so that they affect releases, not just develop.
Use standard pytest markers everywhere in the numpy tests. At this point there should be no nose dependency. However, nose is required to test the legacy decorators if so desired. At this point, numpy test cannot be run in the way with runtests, rather installed numpy can be tested with `pytest --pyargs numpy` as long as that is not run from the repo. Run it from the tools directory or some such.
Numpy can now be tested using the standard
`python -c"import numpy; numpy.test()"`
construct.
Takes over some bits from SciPy. The most visible user change is the replacement of `--timer` by `--durations`, with `--durations=0` meaning time all tests.
For the time being, these tests will ignore the flood of deprecated yield test warnings. Fixing those is for another PR.
charris
force-pushed
the
switch-to-pytest
branch
from
April 4, 2018 13:17
ae48430 to
fedcb3d
Compare
Member
Author
|
I think this is ready. |
Contributor
|
Awesome! Glad to see this. 😄 cc @nicoddemus |
Contributor
|
Awesome indeed. Congratulations @charris on the excellent work! Thanks @jakirkham for the ping! 😁 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This switches numpy testing to pytest instead of nose. The nose specific tools remain available for downstream projects that may have depended on them, but NumPy itself should have no nose dependencies. There will be a follow on cleanup PR(s) that will do the following:
pytest_toolsdirectory.run_module_suitefrom the test files.numpy-wheelsThere is currently no requirement for pytest version. Does anyone have a suggestion?
@njsmith You previously noted that
runtestswas not suitable for ci testing. Could you review your reasoning? Scipy and the NumPy appveyor tests are usingruntests, and I'd like to use it for travis also.See #10856 for checklist of tasks.