Commit 0a2c8325 authored by Paul Ganssle's avatar Paul Ganssle

Add coverage generation to tox

parent 91b2c138
......@@ -5,3 +5,5 @@ virtualenv>=13.0.0
pytest-virtualenv>=1.2.7
pytest>=3.0.2
wheel
coverage
pytest-cov
......@@ -6,6 +6,28 @@
[testenv]
deps=-rtests/requirements.txt
setenv=COVERAGE_FILE={toxworkdir}/.coverage.{envname}
passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir APPVEYOR
commands=py.test {posargs}
# These are separate so xfail tests don't count towards code coverage
commands=pytest -m "not xfail" {posargs: "{toxinidir}" --cov-config={toxinidir}/tox.ini --cov=setuptools}
pytest -m "xfail" {posargs: "{toxinidir}"}
usedevelop=True
[testenv:coverage]
description=Combine coverage data and create reports
deps=coverage
skip_install=True
changedir={toxworkdir}
setenv=COVERAGE_FILE=.coverage
commands=coverage erase
coverage combine
coverage report --rcfile={toxinidir}/tox.ini
coverage xml
[coverage:run]
source=setuptools
[coverage:report]
skip_covered=True
show_missing=True
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment