Skip to content

Commit ab42c42

Browse files
authored
Using pytest-xdist config: --dist=loadscope (#109)
1 parent dd14da1 commit ab42c42

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

tox.ini

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ commands_pre =
2929
poetry install --with dev,test
3030
commands =
3131
unit: python3 -m pytest tests/unit/ --maxfail=3 {posargs}
32-
integration: python3 -m pytest tests/integration/ --exitfirst {posargs}
33-
smoke: python3 -m pytest tests/smoke/ --exitfirst {posargs}
32+
integration: python3 -m pytest tests/integration/ --exitfirst --dist=loadscope {posargs}
33+
smoke: python3 -m pytest tests/smoke/ --exitfirst --dist=loadscope {posargs}
3434
basepython =
3535
3.8: py38
3636
3.9: py39
@@ -50,16 +50,20 @@ setenv =
5050
PYTHONUNBUFFERED = 1
5151
PYTHONDONTWRITEBYTECODE = 1
5252
commands =
53-
python3 -m pytest tests --exitfirst -n auto \
54-
--reruns 5 --rerun-except AssertionError {posargs}
53+
python3 -m pytest tests --exitfirst \
54+
-n auto --dist=loadscope \
55+
--reruns 5 --rerun-except AssertionError \
56+
{posargs}
5557

5658
[testenv:parallel]
5759
setenv =
5860
PYTHONUNBUFFERED = 1
5961
PYTHONDONTWRITEBYTECODE = 1
6062
commands =
61-
tox -e py312-unit,py312-integration,py312-smoke -p auto -o -- --exitfirst -n auto \
62-
--reruns 5 --reruns-delay 60 --rerun-except AssertionError {posargs}
63+
tox -e py312-unit,py312-integration,py312-smoke -p auto -o -- --exitfirst \
64+
-n auto --dist=loadscope \
65+
--reruns 5 --reruns-delay 60 --rerun-except AssertionError \
66+
{posargs}
6367

6468
[testenv:mypy]
6569
commands_pre =

0 commit comments

Comments
 (0)