diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2020-07-02 17:43:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-02 17:43:05 -0400 |
commit | 382c736eac05ce9029f334a038f81d78c868f091 (patch) | |
tree | 5a909d086b21e146fbfd577b40bf7d98b4adeb11 | |
parent | 2a55538aaf5cbcfeaf3e8b79866d3144fb8c324a (diff) | |
parent | c897b90cbcd2d5a907d3b677f7229c2be7c44528 (diff) | |
download | external_python_setuptools-382c736eac05ce9029f334a038f81d78c868f091.tar.gz external_python_setuptools-382c736eac05ce9029f334a038f81d78c868f091.tar.bz2 external_python_setuptools-382c736eac05ce9029f334a038f81d78c868f091.zip |
Merge pull request #2224 from pypa/better-cov
Improve coverage configuration
-rw-r--r-- | .coveragerc | 8 | ||||
-rw-r--r-- | .github/workflows/python-tests.yml | 2 | ||||
-rw-r--r-- | .travis.yml | 25 | ||||
-rw-r--r-- | pytest.ini | 2 | ||||
-rw-r--r-- | tox.ini | 13 |
5 files changed, 19 insertions, 31 deletions
diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 00000000..2f0e8714 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,8 @@ +[run] +source= + pkg_resources + setuptools +omit= + */_vendor/* + +[report] diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml index e3663cf0..5a598084 100644 --- a/.github/workflows/python-tests.yml +++ b/.github/workflows/python-tests.yml @@ -98,5 +98,3 @@ jobs: python -m tox --parallel auto - -- - --cov diff --git a/.travis.yml b/.travis.yml index f97abc51..e8bc7574 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,6 @@ jobs: fast_finish: true include: - python: pypy3 - env: DISABLE_COVERAGE=1 # Don't run coverage on pypy (too slow). - python: 3.5 - python: 3.6 - python: 3.7 @@ -15,12 +14,12 @@ jobs: env: LANG=C - python: 3.8-dev - <<: *latest_py3 - env: TOXENV=docs DISABLE_COVERAGE=1 + env: TOXENV=docs allow_failures: # suppress failures due to pypa/setuptools#2000 - python: pypy3 - <<: *latest_py3 - env: TOXENV=docs DISABLE_COVERAGE=1 + env: TOXENV=docs cache: pip @@ -39,22 +38,8 @@ install: script: - export NETWORK_REQUIRED=1 - - | - ( # Run testsuite. - if [ -z "$DISABLE_COVERAGE" ] - then - tox -- --cov - else - tox - fi - ) + - tox after_success: - - | - ( # Upload coverage data. - if [ -z "$DISABLE_COVERAGE" ] - then - export TRAVIS_JOB_NAME="${TRAVIS_PYTHON_VERSION} (LANG=$LANG)" CODECOV_ENV=TRAVIS_JOB_NAME - tox -e coverage,codecov - fi - ) + - export TRAVIS_JOB_NAME="${TRAVIS_PYTHON_VERSION} (LANG=$LANG)" CODECOV_ENV=TRAVIS_JOB_NAME + - tox -e coverage,codecov @@ -1,5 +1,5 @@ [pytest] -addopts=--doctest-modules --flake8 --doctest-glob=pkg_resources/api_tests.txt -r sxX +addopts=--doctest-modules --flake8 --doctest-glob=pkg_resources/api_tests.txt --cov -r sxX norecursedirs=dist build *.egg setuptools/extern pkg_resources/extern pkg_resources/tests/data tools .* setuptools/_vendor pkg_resources/_vendor doctest_optionflags=ELLIPSIS ALLOW_UNICODE filterwarnings = @@ -23,12 +23,16 @@ setenv = # 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 Program* CommonProgram* VS* APPVEYOR APPVEYOR_* CI CODECOV_* TRAVIS TRAVIS_* NETWORK_REQUIRED -commands=pytest --cov-config={toxinidir}/tox.ini --cov-report= {posargs} +commands = pytest {posargs} usedevelop=True extras = tests +[testenv:pypy{,3}] +commands = pytest --no-cov {posargs} + + [testenv:coverage] description=Combine coverage data and create report deps=coverage @@ -53,13 +57,6 @@ changedir = docs commands = python -m sphinx . {toxinidir}/build/html -[coverage:run] -source= - pkg_resources - setuptools -omit= - */_vendor/* - [testenv:finalize] skip_install = True deps = |