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 =
deps = {[testenv]deps}
[testenv:coverage]
basepython =
python2.7
basepython = python2.7
usedevelop = true
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 -y ZODB
pip install -e .
nosetests --with-xunit --with-xcoverage
coverage run --source=ZODB -m zope.testrunner --test-path=src --auto-color --auto-progress
coverage report
deps =
nose
coverage
nosexcover
BTrees
ZConfig
manuel
persistent
six
transaction
zc.lockfile
zdaemon
zope.interface
zope.testing
{[testenv]deps}
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