Skip to content

Commit

Permalink
Add coverage to tox, fixup buildout
Browse files Browse the repository at this point in the history
  • Loading branch information
gyst committed Jan 12, 2018
1 parent f511e2b commit 4f439cc
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*.pyc
.coverage
.coverage*
.installed.cfg
.tox/
__pycache__
Expand All @@ -8,5 +8,7 @@ develop-eggs
include/
lib/
parts
pip-selfcheck.json
pyvenv.cfg
share/
src/*.egg-info
2 changes: 1 addition & 1 deletion buildout.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ interpreter = py
[test]
recipe = zc.recipe.testrunner
eggs = grokcore.message [test]
defaults = ['--tests-pattern', '^f?tests$', '-v', '-c']
defaults = ['-v', '-c']
26 changes: 24 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,16 +1,38 @@
[tox]
envlist =
coverage-clean,
py27,
py34,
py35,
py36,
pypy,
pypy3
pypy3,
coverage-report

[testenv]
commands =
coverage run -m zope.testrunner --test-path=src {posargs:-vc}
coverage run --source=grokcore.message -m zope.testrunner --test-path=src {posargs:-vc}
setenv =
COVERAGE_FILE=.coverage.{envname}
deps =
.[test]
zope.testrunner
coverage

[testenv:coverage-clean]
deps = coverage
setenv =
COVERAGE_FILE=.coverage
skip_install = true
commands = coverage erase

[testenv:coverage-report]
deps = coverage
setenv =
COVERAGE_FILE=.coverage
skip_install = true
commands =
coverage combine
coverage report
coverage html
coverage

0 comments on commit 4f439cc

Please sign in to comment.