Skip to content

Commit

Permalink
Fix coverage testing + test coverage in subprocesses.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Nov 29, 2018
1 parent e577cb2 commit 20e38b0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
8 changes: 8 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[run]
branch = True
source = $COVERAGE_HOME/src/plone/recipe/zeoserver
parallel = true
data_file = $COVERAGE_HOME/.coverage

[report]
precision = 2
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
.installed.cfg
*.pyc
.coverage
.coverage.*
.installed.cfg
.tox/
bin/
develop-eggs/
htmlcov/
include/
lib/
parts/
Expand Down
14 changes: 8 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,18 @@ deps =
zope.testrunner

[testenv:coverage]
basepython = python2.7
deps = coverage
basepython = python3.6
deps =
zope.testrunner
coverage
setenv =
COVERAGE_FILE=.coverage
COVERAGE_HOME={toxinidir}
COVERAGE_PROCESS_START={toxinidir}/.coveragerc
commands =
coverage erase
coverage run -m zope.testrunner --test-path=src {posargs:-vc}
coverage combine
coverage html
coverage xml
coverage report
coverage report --fail-under=63

[testenv:flake8]
basepython = python2.7
Expand Down

0 comments on commit 20e38b0

Please sign in to comment.