Split out pre command

Co-authored-by: Bernát Gábor <690238+gaborbernat@users.noreply.github.com>
This commit is contained in:
Hynek Schlawack 2023-06-26 18:09:43 +02:00
parent 494ea59c84
commit 7c264ad4a5
No known key found for this signature in database
GPG Key ID: AE2536227F69F181
1 changed files with 2 additions and 3 deletions

View File

@ -33,9 +33,8 @@ install_command = python -Im pip install --no-compile {opts} {packages}
set_env =
COVERAGE_PROCESS_START={toxinidir}/pyproject.toml
PYTHONWARNINGS=d
commands =
python -c 'f = open("{env_site_packages_dir}/cov.pth", "w"); f.write("import coverage; coverage.process_startup()"); f.close()'
coverage run -m pytest {posargs:-n auto}
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}
[testenv:coverage-report]