Skip to content

Commit

Permalink
Use zope.testrunner in tox and travis
Browse files Browse the repository at this point in the history
Life's too short to debug setup.py test.

Also fix coverage reporting to aggregate the same module installed in
different locations.
  • Loading branch information
mgedmin committed Nov 30, 2018
1 parent dc99e5a commit 93ef5cd
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[run]
source = z3c.currency
omit = */test*

[paths]
source =
src/z3c/currency
.tox/*/lib/python*/site-packages/z3c/currency
.tox/pypy*/site-packages/z3c/currency
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ src/*.egg-info
.tox/
.coverage
.eggs
.coverage.*
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ matrix:
sudo: true

install:
- travis_retry pip install .[form,test] z3c.form
- travis_retry pip install coverage coveralls tox zope.testing
- pip install .[form,test]
- pip install coverage coveralls zope.testrunner

script:
- coverage run setup.py test -q
- coverage run -m zope.testrunner --test-path=src -vc

notifications:
email: false
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ envlist =

[testenv]
commands =
coverage run setup.py test -q
coverage run -m zope.testrunner --test-path=src {posargs:-v}
deps =
.[form,test]
z3c.form
zope.testing
zope.testrunner
coverage
setenv =
Expand All @@ -23,3 +21,5 @@ commands =
coverage erase
coverage combine
coverage report
deps =
coverage

0 comments on commit 93ef5cd

Please sign in to comment.