Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using pytest-xdist config: --dist=loadscope #109

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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