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
Splitting tests when using pytest marker expressions is appearing to break the splitting. For example, I added this to a Django project that has a mixture of unit and functional tests. The functional tests are marked with @pytest.mark.browser while other test have different or no marks. There are 347 tests with the marker. This is how the collection preformed when I split only the browser tests:
pytest -m "browser" --splits 3 --group 1
[pytest-split] Running group 1/2
collected 5399 items / 5399 deselected
In summary, I think we should change pytest_collection_modifyitems to trylast=True instead of tryfirst=True to fix the aforementioned bug and performance issue.
The text was updated successfully, but these errors were encountered:
Splitting tests when using
pytest
marker expressions is appearing to break the splitting. For example, I added this to a Django project that has a mixture of unit and functional tests. The functional tests are marked with@pytest.mark.browser
while other test have different or no marks. There are 347 tests with the marker. This is how the collection preformed when I split only thebrowser
tests:pytest -m "browser" --splits 3 --group 1
pytest -m "browser" --splits 2 --group 2
Steps to reproduce
See test case in #18. If you execute this code with
tryfirst=True
, one group will deselect all tests instead of splitting.Proposal
See #18.
In summary, I think we should change
pytest_collection_modifyitems
totrylast=True
instead oftryfirst=True
to fix the aforementioned bug and performance issue.The text was updated successfully, but these errors were encountered: