Skip to content

Commit

Permalink
Add coverage testing to tox.
Browse files Browse the repository at this point in the history
  • Loading branch information
tseaver committed Feb 3, 2015
1 parent 28f3028 commit 8b9d1a2
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ build
develop-eggs
parts
docs/_build
.coverage
coverage.xml
nosetests.xml
8 changes: 8 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[nosetests]
nocapture=1
cover-package=zope.structuredtext
cover-erase=1
#cover-branches=1
#cover-min-percentage=100
with-doctest=0
where=src
4 changes: 4 additions & 0 deletions src/zope/structuredtext/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
We first need to structurize the string and make a full-blown
document out of it:
>>> structured_string = '''
... Title Here
...
... Body text here.'''
>>> struct = structurize(structured_string)
>>> doc = DocumentWithImages()(struct)
Expand Down
14 changes: 12 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,21 @@
envlist =
# Pending normalization of HTML output for regressions.
# py26,py27,py33,py34,pypy,pypy3
py26,py27,py33,py34,docs
py26,py27,py33,py34,coverage,docs

[testenv]
commands =
python setup.py test -q
python setup.py -q test -q

[testenv:coverage]
basepython =
python2.7
commands =
nosetests --with-xunit --with-xcoverage
deps =
nose
coverage
nosexcover

[testenv:docs]
basepython =
Expand Down

0 comments on commit 8b9d1a2

Please sign in to comment.