Limit xdist distribution to files

I get regularly spurious failures in tox in the Mypy tests because of
being able to access certain files. I hope running the file
non-concurently helps here.
This commit is contained in:
Hynek Schlawack 2024-08-01 07:05:59 +02:00
parent b78abadbbf
commit 1dfd14856b
No known key found for this signature in database
1 changed files with 2 additions and 1 deletions

View File

@ -34,7 +34,8 @@ set_env =
COVERAGE_PROCESS_START={toxinidir}/pyproject.toml
PYTHONWARNINGS=d
commands_pre = python -c 'import pathlib; pathlib.Path("{env_site_packages_dir}/cov.pth").write_text("import coverage; coverage.process_startup()")'
commands = coverage run -m pytest {posargs:-n auto}
# We group xdist execution by file because otherwise the Mypy tests have race conditions.
commands = coverage run -m pytest {posargs:-n auto --dist loadfile}
[testenv:coverage-report]
# Keep base_python in-sync with .python-version-default