Skip to content

Commit

Permalink
Set up to use tox as possible testrunner and show coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
sallner committed Sep 28, 2016
1 parent 3382a95 commit aa97e6f
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[run]
branch = True
source = grokcore.annotation

[report]
precision = 2
omit = */interfaces.py
*/interfaces/*
*/tests.py
*/tests/*
*/testing.py

[html]
directory = htmlcov

[paths]
source =
src/grokcore/annotation
.tox/*/lib/python*/site-packages/grokcore/annotation

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
__pycache__
src/*.egg-info

.coverage
.installed.cfg
.tox/
bin
develop-eggs
htmlcov/
parts
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@ def read(*rnames):
'zope.interface',
],
tests_require=tests_require,
test_suite='grokcore.annotation.tests.test_grok.test_suite',
extras_require={'test': tests_require},
)
28 changes: 28 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[tox]
envlist = coverage-clean, py27, coverage-report

[testenv]
commands =
coverage run setup.py test
setenv =
COVERAGE_FILE=.coverage.{envname}
deps =
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 aa97e6f

Please sign in to comment.