Skip to content

Commit

Permalink
Using pytest-xdist config: --dist=loadscope (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nusnus authored Dec 12, 2023
1 parent dd14da1 commit ab42c42
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 =
Expand Down

0 comments on commit ab42c42

Please sign in to comment.