Commit 877cd71
authored
Don't break --failed-first when re-ordering tests (#820)
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 #8191 parent 619dd30 commit 877cd71
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
415 | 415 | | |
416 | 416 | | |
417 | 417 | | |
| 418 | + | |
418 | 419 | | |
419 | 420 | | |
420 | 421 | | |
| |||
0 commit comments