diff --git a/.coveragerc b/.coveragerc index 9ef955843..97934dc3b 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,4 +1,9 @@ [run] -source = _pytest,testing +source = pytest,_pytest,testing/ parallel = 1 branch = 1 + +[paths] +source = src/ + .tox/*/lib/python*/site-packages/ + .tox\*\Lib\site-packages\ diff --git a/.travis.yml b/.travis.yml index dd7529d20..a319c0922 100644 --- a/.travis.yml +++ b/.travis.yml @@ -84,7 +84,7 @@ before_script: if [[ "$PYTEST_NO_COVERAGE" != 1 ]]; then export COVERAGE_FILE="$PWD/.coverage" export COVERAGE_PROCESS_START="$PWD/.coveragerc" - export _PYTEST_TOX_COVERAGE_RUN="coverage run --source {envsitepackagesdir}/_pytest/,{toxinidir}/testing -m" + export _PYTEST_TOX_COVERAGE_RUN="coverage run -m" export _PYTEST_TOX_EXTRA_DEP=coverage-enable-subprocess fi diff --git a/scripts/prepare-coverage.bat b/scripts/prepare-coverage.bat index fbf4da66a..bff1e62b0 100644 --- a/scripts/prepare-coverage.bat +++ b/scripts/prepare-coverage.bat @@ -2,7 +2,7 @@ REM scripts called by AppVeyor to setup the environment variables to enable cove if not defined PYTEST_NO_COVERAGE ( set "COVERAGE_FILE=%CD%\.coverage" set "COVERAGE_PROCESS_START=%CD%\.coveragerc" - set "_PYTEST_TOX_COVERAGE_RUN=coverage run --source {envsitepackagesdir}/_pytest/,{toxinidir}/testing -m" + set "_PYTEST_TOX_COVERAGE_RUN=coverage run -m" set "_PYTEST_TOX_EXTRA_DEP=coverage-enable-subprocess" echo Coverage setup completed ) else (