Skip to content

Commit 417516c

Browse files
committed
squash! Travis: report coverage with all builds
doctesting: remove changedir With coverage 5 we could use COVERAGE_RCFILE to make it find the .coveragerc, or we could add `--rcfile` to _PYTEST_TOX_COVERAGE_RUN, but I've thought that this should not be the job that has to test if `--pyargs` actually works.
1 parent f730291 commit 417516c

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,8 @@ jobs:
8181
before_script:
8282
- |
8383
if [[ "$PYTEST_NO_COVERAGE" != 1 ]]; then
84-
export _PYTEST_TOX_COVERAGE_RUN="env COVERAGE_FILE=$PWD/.coverage coverage run --source {envsitepackagesdir}/_pytest/,$PWD/testing -m"
84+
export _PYTEST_TOX_COVERAGE_RUN="env COVERAGE_FILE=$PWD/.coverage COVERAGE_PROCESS_START=$PWD/.coveragerc coverage run --source {envsitepackagesdir}/_pytest/,$PWD/testing -m"
8585
export _PYTEST_TOX_EXTRA_DEP=coverage-enable-subprocess
86-
export COVERAGE_PROCESS_START="$PWD/.coveragerc"
8786
fi
8887
8988
script: tox --recreate

tox.ini

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ commands =
2121
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest --lsof -ra {env:_PYTEST_TEST_OPTS:} {posargs:testing}
2222
coverage: coverage report -m --skip-covered
2323
setenv =
24-
coverage: _PYTEST_TOX_COVERAGE_RUN=coverage run -a -m
25-
coverage: _PYTEST_TOX_EXTRA_DEP=coverage-enable-subprocesses
24+
coverage: _PYTEST_TOX_COVERAGE_RUN=coverage run -m
25+
coverage: _PYTEST_TOX_EXTRA_DEP=coverage-enable-subprocess
2626
coverage: COVERAGE_FILE={toxinidir}/.coverage
2727
coverage: COVERAGE_PROCESS_START={toxinidir}/.coveragerc
28-
passenv = USER USERNAME COVERAGE_PROCESS_START
28+
passenv = USER USERNAME
2929
deps =
3030
hypothesis>=3.56
3131
nose
@@ -142,13 +142,11 @@ commands =
142142
[testenv:doctesting]
143143
basepython = python
144144
skipsdist = True
145-
# ensure the given pyargs can't mean anything else
146-
changedir = doc/
147145
deps =
148146
PyYAML
149147
{env:_PYTEST_TOX_EXTRA_DEP:}
150148
commands =
151-
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest -ra en
149+
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest -ra doc/en
152150
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest --doctest-modules --pyargs _pytest
153151

154152
[testenv:regen]

0 commit comments

Comments
 (0)