From 28218f330023bf00854529a92c744f74651973a6 Mon Sep 17 00:00:00 2001 From: Tomer Nosrati Date: Tue, 12 Dec 2023 16:28:02 +0200 Subject: [PATCH] Using pytest-xdist config: --dist=loadscope --- tox.ini | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tox.ini b/tox.ini index 4fe879fa..02d3e26e 100644 --- a/tox.ini +++ b/tox.ini @@ -29,8 +29,8 @@ commands_pre = poetry install --with dev,test commands = unit: python3 -m pytest tests/unit/ --maxfail=3 {posargs} - integration: python3 -m pytest tests/integration/ --exitfirst {posargs} - smoke: python3 -m pytest tests/smoke/ --exitfirst {posargs} + integration: python3 -m pytest tests/integration/ --exitfirst --dist=loadscope {posargs} + smoke: python3 -m pytest tests/smoke/ --exitfirst --dist=loadscope {posargs} basepython = 3.8: py38 3.9: py39 @@ -50,16 +50,20 @@ setenv = PYTHONUNBUFFERED = 1 PYTHONDONTWRITEBYTECODE = 1 commands = - python3 -m pytest tests --exitfirst -n auto \ - --reruns 5 --rerun-except AssertionError {posargs} + python3 -m pytest tests --exitfirst \ + -n auto --dist=loadscope \ + --reruns 5 --rerun-except AssertionError \ + {posargs} [testenv:parallel] setenv = PYTHONUNBUFFERED = 1 PYTHONDONTWRITEBYTECODE = 1 commands = - tox -e py312-unit,py312-integration,py312-smoke -p auto -o -- --exitfirst -n auto \ - --reruns 5 --reruns-delay 60 --rerun-except AssertionError {posargs} + tox -e py312-unit,py312-integration,py312-smoke -p auto -o -- --exitfirst \ + -n auto --dist=loadscope \ + --reruns 5 --reruns-delay 60 --rerun-except AssertionError \ + {posargs} [testenv:mypy] commands_pre =