pytest-dev / pytest-dev/pytest-xdist
Is there a way to run groups in parallel
Open
Nobody has claimed this yet.
needs information
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 287
- Avg merge
- 9h 30m
- Merged PRs (30d)
- 2
Description
test.py
import pytest
import time
@pytest.mark.xdist_group(name="group1")
def test_1_1():
time.sleep(5)
assert True
@pytest.mark.xdist_group(name="group1")
def test_1_2():
time.sleep(5)
assert True
pytest -n auto --dist loadgroup test.py
Is there a way to get group1 to run in parallel and take ~5s rather than ~10s it takes with the above setup
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 with the test.py example and the pytest -n auto --dist loadgroup test.py command, then trace how xdist_group and loadgroup schedule tests. Establish whether tests within one group can run in parallel and define the expected behavior or documentation needed, with the result validated against the reported 5-second versus 10-second timing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- distributed-systems, testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100