You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When there are failing tests in sibling sub-directories of the tests directory with __init__.py files, pytest --lf runs the failing tests from only one of the directories, not all the tests that failed on the last run. We need to use __init.py__ files if test files in different directories have the same name. But then pytest --lf fails to run as expected. If the __init__.py files are removed, then the --lf option runs all the failing tests.
Running pytest from tests/ directory reports 2 failing tests. But pytest --lf runs only 1 test - func/test_one.py - and skips the other. If the __init__.py files are removed and the test files are given different names, then pytest --lf runs both tests as expected.
The text was updated successfully, but these errors were encountered:
When there are failing tests in sibling sub-directories of the
tests
directory with__init__.py
files,pytest --lf
runs the failing tests from only one of the directories, not all the tests that failed on the last run. We need to use__init.py__
files if test files in different directories have the same name. But thenpytest --lf
fails to run as expected. If the__init__.py
files are removed, then the--lf
option runs all the failing tests.pip list
output:pytest version - 6.1.1
OS - Ubuntu 18.04
Example
Running
pytest
fromtests/
directory reports 2 failing tests. Butpytest --lf
runs only 1 test - func/test_one.py - and skips the other. If the__init__.py
files are removed and the test files are given different names, thenpytest --lf
runs both tests as expected.The text was updated successfully, but these errors were encountered: