pytest-dev / pytest-dev/pytest-xdist
Test collection is not working as expected when using "--tx socket"
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 287
- Avg merge
- 9h 30m
- Merged PRs (30d)
- 2
Description
When trying to execute pytest using xdist over socket the test collection ignores the folder parameter.
The command:
pytest <folder>/path/to/tests_a_folder -v -s -d --tx socket=10.50.60.55:6600 -o log_cli=true --durations=0 --junitxml=tests-results/unit_tests.xml --rsyncdir <folder> <folder>
The result is that pytest collects all the tests under and not the only the tests under <folder>/path/to/tests_a_folder
Using:
pytest 6.1.2
pytest-xdist 2.2.1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported command with pytest 6.1.2 and pytest-xdist 2.2.1, using --tx socket and a nested tests folder. Trace test collection in socket mode to determine why the folder argument is ignored; done means only tests under the requested path are collected, with a regression test covering this command.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100