pytest-xdist icon indicating copy to clipboard operation
pytest-xdist copied to clipboard

Tests not selected when running with -n auto --dist loadgroup

Open nikolapopovic opened this issue 1 year ago • 1 comments

Summary:

I am encountering an issue where no test cases are selected when running tests in parallel with pytest-xdist using the arguments -n auto --dist loadgroup. This issue arose suddenly, and previously, the same setup worked fine.

My test suite includes the use of the @pytest.mark.xdist_group(name="quotation") decorator to group related tests, ensuring they run on the same worker. However, now the test run outputs 0 cases selected, despite tests running correctly without the --dist loadgroup option.

When running the tests without these arguments, tests are executed correctly.

Details: Environment: Python version: 3.9.11 pytest version: 8.0.2 pytest-xdist version: 2.5.0 Running tests in a Linux environment via Jenkins. Error/Output:

[INFO]: 0 个cases selected
============================= test session starts ==============================
platform linux -- Python 3.9.11, pytest-8.0.2, pluggy-1.5.0 -- /usr/bin/python
cachedir: .pytest_cache

Did anything changed that can affect this?

Thank you in advance!

nikolapopovic avatar Sep 26 '24 11:09 nikolapopovic

Off hand it's unclear what's happening, a minimal reproducer would be of immense help as off it's unclear what's happening

RonnyPfannschmidt avatar Sep 27 '24 07:09 RonnyPfannschmidt