Skip to content

Commit

Permalink
Add coverage testing under 'tox'.
Browse files Browse the repository at this point in the history
  • Loading branch information
tseaver committed Feb 2, 2015
1 parent 6433c87 commit aa0c199
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ src/zope.dottedname.egg-info
.tox
*.py[co]
docs/_build/
.coverage
coverage.xml
nosetests.xml
6 changes: 6 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[nosetests]
nocapture=1
cover-package=zope.dottedname
cover-erase=1
with-doctest=0
where=src
22 changes: 16 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
[tox]
envlist =
py26,py27,py32,py33,py34,pypy,pypy3,docs
py26,py27,py32,py33,py34,pypy,pypy3,coverage,docs

[testenv]
commands =
python setup.py test -q
# without explicit deps, setup.py test will download a bunch of eggs into $PWD
# (and it seems I can't use zope.dottedname[testing] here, so forget DRY)
python setup.py -q test -q

[testenv:coverage]
basepython =
python2.7
commands =
# The installed version messes up nose's test discovery / coverage reporting
# So, we uninstall that from the environment, and then install the editable
# version, before running nosetests.
pip uninstall -q -y zope.dottedname
pip install -q -e .
nosetests --with-xunit --with-xcoverage
deps =
zope.testing
nose
coverage
nosexcover


[testenv:docs]
Expand All @@ -18,5 +29,4 @@ commands =
sphinx-build -b html -d docs/_build/doctrees docs docs/_build/html
sphinx-build -b doctest -d docs/_build/doctrees docs docs/_build/doctest
deps =
{[testenv]deps}
Sphinx

0 comments on commit aa0c199

Please sign in to comment.