Skip to content

Commit

Permalink
Run doctests in all environments on tox the same way they run on Trav…
Browse files Browse the repository at this point in the history
…is CI.

Likewise for the tests in tox.ini.

Hopefully this fixes our coverage numbers.
  • Loading branch information
jamadden committed Oct 10, 2018
1 parent 928fa89 commit 4173080
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -17,7 +17,7 @@ install:
- pip install -U -e .[test,docs]
script:
- coverage run -m zope.testrunner --test-path=. -v
- cd docs; make doctest
- coverage run -a -m sphinx.cmd.build -b doctest -d docs/_build/doctrees docs docs/_build/doctest
notifications:
email: false
after_success:
Expand Down
2 changes: 1 addition & 1 deletion docs/datamanager.rst
Expand Up @@ -2,7 +2,7 @@ Writing a Data Manager
======================

Simple Data Manager
------------------
-------------------

.. doctest::

Expand Down
2 changes: 1 addition & 1 deletion docs/developer.rst
@@ -1,5 +1,5 @@
:mod:`transaction` Developer Documentation
================================
==========================================

Transaction objects manage resources for an individual activity.

Expand Down
15 changes: 8 additions & 7 deletions tox.ini
Expand Up @@ -4,26 +4,27 @@ envlist =

[testenv]
commands =
python setup.py -q test -q
zope-testrunner --test-path=.
sphinx-build -b doctest -d docs/_build/doctrees docs docs/_build/doctest
deps =
mock
zope.testrunner
.[test,docs]

[testenv:coverage]
basepython =
python2.7
python3.6
commands =
nosetests --with-xunit --with-xcoverage
coverage run -m zope.testrunner --test-path=.
coverage run -a -m sphinx.cmd.build -b doctest -d docs/_build/doctrees docs docs/_build/doctest
coverage report --fail-under=97
deps =
{[testenv]deps}
nose
coverage
nosexcover

[testenv:docs]
basepython =
python2.7
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 =
.[docs]

0 comments on commit 4173080

Please sign in to comment.