Внезапно py.test --last-failed
пропускает много тестов, хотя нет тест не пройден в предыдущем тестовом прогоне. Вот результат первого запуска py.test --vv
, а затем py.test --vv --last-failed
:
$venv/bin/py.test -vv
======================================================================= test session starts =======================================================================
platform darwin -- Python 3.7.3, pytest-4.6.3, py-1.8.0, pluggy-0.12.0 -- /Users/lars/coding/talea/fahrtwind/products/backend/venv/bin/python3
cachedir: .pytest_cache
rootdir: /Users/lars/coding/talea/fahrtwind/products/backend, inifile: pytest.ini, testpaths: tests
plugins: forked-1.0.2, env-0.6.2, xdist-1.28.0, cov-2.7.1
collected 888 items
...
<HERE ALL 888 TESTS ARE RUN AND ALL PASS>
...
=================================================================== 888 passed in 63.89 seconds ===================================================================
$
$
$venv/bin/py.test -vv --last-failed
======================================================================= test session starts =======================================================================
platform darwin -- Python 3.7.3, pytest-4.6.3, py-1.8.0, pluggy-0.12.0 -- /Users/lars/coding/talea/fahrtwind/products/backend/venv/bin/python3
cachedir: .pytest_cache
rootdir: /Users/lars/coding/talea/fahrtwind/products/backend, inifile: pytest.ini, testpaths: tests
plugins: forked-1.0.2, env-0.6.2, xdist-1.28.0, cov-2.7.1
collected 303 items
run-last-failure: 181 known failures not in selected tests (skipped 206 files)
...
<HERE ONLY 303 TESTS ARE RUN>
...
Почему py.test --last-failed
пропускает многие тесты, хотя ранее ни один из них не был пройден?