Skip to content

Commit

Permalink
tox: Report coverage to user
Browse files Browse the repository at this point in the history
Run 'coverage report' after a successful coverage run. There's enough
coverage-related stuff here at this point to warrant its own section.

Signed-off-by: Stephen Finucane <[email protected]>
  • Loading branch information
stephenfin committed Dec 24, 2017
1 parent a3f9935 commit 77ca894
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ passenv =
description =
py{27,34,35,36,py}: Run unit tests against {envname}.
du{11,12,13,14}: Run unit tests with the given version of docutils.
coverage: Run code coverage checks.

# TODO(stephenfin) Replace this with the 'extras' config option when tox 2.4 is
# widely available, likely some time after the Ubuntu 18.04 release
Expand All @@ -22,7 +21,6 @@ deps =
du14: docutils==0.14
setenv =
SPHINX_TEST_TEMPDIR = {envdir}/testbuild
coverage: PYTEST_ADDOPTS = --cov sphinx --cov-config {toxinidir}/setup.cfg
commands=
{envpython} -Wall tests/run.py --durations 25 {posargs}

Expand All @@ -41,6 +39,15 @@ deps =
commands =
pylint --rcfile utils/pylintrc sphinx

[testenv:coverage]
description =
Run code coverage checks.
setenv =
PYTEST_ADDOPTS = --cov sphinx --cov-config {toxinidir}/setup.cfg
commands =
{[testenv]commands}
coverage report

[testenv:mypy]
description =
Run type checks.
Expand Down

0 comments on commit 77ca894

Please sign in to comment.