-
Notifications
You must be signed in to change notification settings - Fork 347
Ordering of tests #223
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
Ordering of tests #223
Conversation
|
Squashed/rebased. |
48ac3b7
to
9f5645e
Compare
Should/could get improved based on #214 (comment). |
Codecov Report
@@ Coverage Diff @@
## master #223 +/- ##
========================================
- Coverage 98.03% 98% -0.04%
========================================
Files 32 32
Lines 1831 1853 +22
Branches 142 147 +5
========================================
+ Hits 1795 1816 +21
- Misses 23 24 +1
Partials 13 13
Continue to review full report at Codecov.
|
78c73c4
to
20bf80b
Compare
20bf80b
to
d7d89c7
Compare
This uses `pytest_collection_modifyitems` to order the tests. Fixes pytest-dev#214.
Pytest-django 3.5.0 attempts to run tests in the same order as Django: Issue pytest-dev#223, Commit 5a79fba Pytest itself can re-order tests to prioritize previously failed tests (--failed-first), incremental runs of the test suite (--stepwise), etc. However, pytest-django's re-ordering clobbers pytest's, which can break those options as reported in pytest-dev#819. By applying the @pytest.hookimpl(tryfirst=True) decorator to pytest_collection_modifyitems(), pytest-django's re-ordering happens first, and nolonger clobbers the later re-ordering performed by pytest. Fixes pytest-dev#819
Pytest-django 3.5.0 attempts to run tests in the same order as Django: Issue pytest-dev#223, Commit 5a79fba Pytest itself can re-order tests to prioritize previously failed tests (--failed-first), incremental runs of the test suite (--stepwise), etc. However, pytest-django's re-ordering clobbers pytest's, which can break those options as reported in pytest-dev#819. By applying the @pytest.hookimpl(tryfirst=True) decorator to pytest_collection_modifyitems(), pytest-django's re-ordering happens first, and does not clobber the later re-ordering performed by pytest. Fixes pytest-dev#819
Pytest-django 3.5.0 attempts to run tests in the same order as Django: Issue #223, Commit 5a79fba Pytest itself can re-order tests to prioritize previously failed tests (--failed-first), incremental runs of the test suite (--stepwise), etc. However, pytest-django's re-ordering clobbers pytest's, which can break those options as reported in #819. By applying the @pytest.hookimpl(tryfirst=True) decorator to pytest_collection_modifyitems(), pytest-django's re-ordering happens first, and does not clobber the later re-ordering performed by pytest. Fixes #819
This is for #214.
TODO: