aboutsummaryrefslogtreecommitdiffstats
path: root/tox.ini
diff options
context:
space:
mode:
authorBenoit Pierre <benoit.pierre@gmail.com>2018-03-26 18:34:40 +0200
committerPaul Ganssle <paul@ganssle.io>2018-03-27 14:48:16 -0400
commit58d299de99612f76f2ff5cfe7fb142d95e5e8738 (patch)
tree190776940665eabdba6e07d184b320862c4a5114 /tox.ini
parent685987d6275f8d9f5815c0f80bf581fb3d6d02fd (diff)
downloadexternal_python_setuptools-58d299de99612f76f2ff5cfe7fb142d95e5e8738.tar.gz
external_python_setuptools-58d299de99612f76f2ff5cfe7fb142d95e5e8738.tar.bz2
external_python_setuptools-58d299de99612f76f2ff5cfe7fb142d95e5e8738.zip
Improve speed and clarity of code coverage
Rationale: - tox should work the same as before - coverage is too slow and disabled by default locally - disable coverage on pypy and pypy3 (way too slow) - add coverage info for pkg_resources - make sure tests are ignored in coverage - make sure all CI jobs are identifiable - include coverage for xfail (too complicated otherwise) - disable report on terminal
Diffstat (limited to 'tox.ini')
-rw-r--r--tox.ini23
1 files changed, 11 insertions, 12 deletions
diff --git a/tox.ini b/tox.ini
index 42d01a2b..a0c4cdf3 100644
--- a/tox.ini
+++ b/tox.ini
@@ -4,28 +4,28 @@
#
# export TOXENV='py27,py3{3,4,5,6},pypy,pypy3'
+[tox]
+envlist=python
+
[testenv]
deps=-rtests/requirements.txt
setenv=COVERAGE_FILE={toxworkdir}/.coverage.{envname}
# TODO: The passed environment variables came from copying other tox.ini files
# These should probably be individually annotated to explain what needs them.
passenv=APPDATA HOMEDRIVE HOMEPATH windir APPVEYOR APPVEYOR_* CI CODECOV_* TRAVIS TRAVIS_*
-# 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}"}
+commands=pytest --cov-config={toxinidir}/tox.ini --cov-report= {posargs}
usedevelop=True
[testenv:coverage]
-description=Combine coverage data and create reports
+description=Combine coverage data and create report
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 {posargs:xml}
[testenv:codecov]
description=[Only run on CI]: Upload coverage data to codecov
@@ -34,9 +34,8 @@ skip_install=True
commands=codecov --file {toxworkdir}/coverage.xml
[coverage:run]
-source=setuptools
-omit=*/_vendor/*
-
-[coverage:report]
-skip_covered=True
-show_missing=True
+source=
+ pkg_resources
+ setuptools
+omit=
+ */_vendor/*