Skip to content

Commit

Permalink
src/tox.ini (coverage.py-html): Split out from coverage.py for better…
Browse files Browse the repository at this point in the history
… help display
  • Loading branch information
Matthias Koeppe committed Nov 14, 2023
1 parent 77bbbec commit aa53aad
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/doc/en/developer/tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ available::
codespell -- check for misspelled words in source code
rst -- validate Python docstrings markup as reStructuredText
coverage.py -- run the Sage doctester with Coverage.py
(use "sage --tox -e coverage.py-html" to generate HTML report)
coverage.py-html -- run the Sage doctester with Coverage.py, generate HTML report
pyright -- run the static typing checker pyright
pycodestyle -- check against the Python style conventions of PEP8
cython-lint -- check Cython files for code style
Expand Down
22 changes: 19 additions & 3 deletions src/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,10 @@ allowlist_externals = {[sagedirect]allowlist_externals}
commands =
{env:SAGE} -t -p 0 {posargs:--all}

[testenv:coverage.py{,-html}]
[testenv:coverage.py]
# https://coverage.readthedocs.io/en/latest/index.html
description =
run the Sage doctester with Coverage.py
(use "sage --tox -e coverage.py-html" to generate HTML report)
## This toxenv bypasses the virtual environment set up by tox.
passenv = {[sagedirect]passenv}
setenv = {[sagedirect]setenv}
Expand All @@ -68,7 +67,24 @@ commands =
commands_post =
{env:SAGE} --python -m coverage combine
{env:SAGE} --python -m coverage report
html: {env:SAGE} --python -m coverage html -d "{envdir}"

[testenv:coverage.py-html]
# https://coverage.readthedocs.io/en/latest/index.html
description =
run the Sage doctester with Coverage.py, generate HTML report
## This toxenv bypasses the virtual environment set up by tox.
passenv = {[sagedirect]passenv}
setenv = {[sagedirect]setenv}
envdir = {[sagedirect]envdir}
allowlist_externals = {[sagedirect]allowlist_externals}
commands_pre =
{env:SAGE} -pip install -U coverage
commands =
{env:SAGE} --python -m coverage run "{toxinidir}/../venv/bin/sage-runtests" -p 0 {posargs:--all}
commands_post =
{env:SAGE} --python -m coverage combine
{env:SAGE} --python -m coverage report
{env:SAGE} --python -m coverage html -d "{envdir}"

[testenv:coverage]
description =
Expand Down

0 comments on commit aa53aad

Please sign in to comment.