From c245cc19c945585c27df6213d3e5b28adfdceb63 Mon Sep 17 00:00:00 2001 From: "Terence D. Honles" Date: Mon, 16 Dec 2019 12:16:23 -0800 Subject: [PATCH] tests: update coverage reporting Add printing test coverage information to stdout when running tox, and fix the numbers so coverage information is only for the source not the tests or the standard library. --- .gitignore | 13 +++++++------ tox.ini | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index e2c2c57d..df117367 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,12 @@ -.tx +*.swp +*egg-info* *pyc *pyo *~ -*egg-info* -/build -/dist -*.swp -.tox/ .coverage .eggs +.python-version +.tox/ +.tx +/build +/dist diff --git a/tox.ini b/tox.ini index 2a13966a..73d17f21 100644 --- a/tox.ini +++ b/tox.ini @@ -12,6 +12,6 @@ install_command = pip install -U {opts} {packages} setenv = TOX_ENV_NAME={envname} passenv = TOX_* TRANSIFEX_USER TRANSIFEX_TOKEN TRANSIFEX_PROJECT CI CI_* CIRCLECI CIRCLE* APPVEYOR* TERM* commands = python -V - coverage run setup.py test + coverage run --source txclib setup.py test bash ./contrib/test_build.sh - bash -c 'test -n "$CI" && codecov -e TOX_ENV_NAME' + bash -c 'if [[ -n "$CI" ]]; then codecov -e TOX_ENV_NAME; else coverage report; fi'