Skip to content

Commit f97088c

Browse files
committed
Fix tox
1 parent d516ab4 commit f97088c

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

.config/requirements-test.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
pytest
1+
black
22
coverage[toml]
3-
coverage-enable-subprocess
43
mypy
54
pip-tools
65
pre-commit

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"mypy-type-checker.importStrategy": "fromEnvironment",
1515
"mypy-type-checker.preferDaemon": true,
1616
"mypy-type-checker.reportingScope": "workspace",
17-
// Override the pyproject.toml and disable xdist to enable test debugging
1817
"python.testing.pytestArgs": ["tests"],
1918
"python.testing.pytestEnabled": true,
2019
"python.testing.unittestEnabled": false

tox.ini

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,16 @@ set_env =
3333
TERM = xterm-256color
3434
commands_pre =
3535
{envpython} -m pip check
36-
sh -c "rm -f {envdir}/.coverage.* 2>/dev/null || true"commands =
37-
commands_post =
36+
python -c 'import pathlib; pathlib.Path("{env_site_packages_dir}/cov.pth").write_text("import coverage; coverage.process_startup()")'
37+
sh -c "rm -f {envdir}/.coverage.* 2>/dev/null || true"
38+
commands =
3839
coverage run -m pytest {posargs:-n auto}
39-
{py,py310,py311,py312,py313}: sh -c "<<EOF
40-
coverage combine -a -q --data-file={envdir}/.coverage {envdir}/.coverage.*
41-
coverage xml --data-file={envdir}/.coverage -o {envdir}/coverage.xml --ignore-errors --fail-under=0
42-
COVERAGE_FILE={envdir}/.coverage coverage lcov --fail-under=0 --ignore-errors -q
43-
COVERAGE_FILE={envdir}/.coverage coverage report --fail-under=0 --ignore-errors
44-
EOF"
40+
{py,py310,py311,py312,py313}: sh -c "\
41+
coverage combine -a -q --data-file={envdir}/.coverage {envdir}/.coverage.* && \
42+
coverage xml --data-file={envdir}/.coverage -o {envdir}/coverage.xml --ignore-errors --fail-under=0 && \
43+
COVERAGE_FILE={envdir}/.coverage coverage lcov --fail-under=0 --ignore-errors -q && \
44+
COVERAGE_FILE={envdir}/.coverage coverage report --fail-under=0 --ignore-errors \
45+
"
4546
git diff --exit-code
4647
allowlist_externals =
4748
git

0 commit comments

Comments
 (0)