Commit 9811ff90 authored by Marius Gedminas's avatar Marius Gedminas

Make 'tox -e coverage' work

It didn't work for me, because nose would crawl inside manual_tests, try
to run test_fstest.py, and fail (because that test is manual and
requires extra setup, like putting fstest.py on PYTHONPATH).

I also don't think that we want to exclude test layers from coverage
measurements (nose doesn't support them).

This change makes 'tox -e coverage' use zope.testrunner like it does for
regular tests.
parent 74e3d008
[run]
# source = ...
# omit = ...
# cover_pylib = False
# branch = True
[report]
exclude_lines =
pragma: nocover
if __name__ == ['"]__main__['"]:
assert False
...@@ -30,26 +30,11 @@ commands = ...@@ -30,26 +30,11 @@ commands =
deps = {[testenv]deps} deps = {[testenv]deps}
[testenv:coverage] [testenv:coverage]
basepython = basepython = python2.7
python2.7 usedevelop = true
commands = commands =
# The installed version messes up nose's test discovery / coverage reporting coverage run --source=ZODB -m zope.testrunner --test-path=src --auto-color --auto-progress
# So, we uninstall that from the environment, and then install the editable coverage report
# version, before running nosetests.
pip uninstall -y ZODB
pip install -e .
nosetests --with-xunit --with-xcoverage
deps = deps =
nose
coverage coverage
nosexcover {[testenv]deps}
BTrees
ZConfig
manuel
persistent
six
transaction
zc.lockfile
zdaemon
zope.interface
zope.testing
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment