Skip to content

Commit

Permalink
Make tox -e coverage work
Browse files Browse the repository at this point in the history
Not installing test dependencies such as manuel was causing problems.

I've also tried to fix coverage reporting not to include the entire
Python stdlib, which works fine for `coverage report`, but nose's xcover
plugin still outputs garbage.

I'm not a fan of plugins that stand between me and coverage.py and break
things.
  • Loading branch information
mgedmin committed Jul 19, 2017
1 parent 57b06d8 commit 03b73b5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
[run]
# This is not as helpful as it may seem, because the parent directory is
# likely also named ZConfig, so this matches things like
# /path/to/ZConfig/.tox/py*/lib/*
source = ZConfig

# datatypes.py is dynamically-created in a temporary directory and then
# removed, which makes coverage reporting unhappy.
omit =
*/datatypes.py
.tox/*
ZConfig/tests/*

[report]
# Coverage is run on Py2 and Py3
# on POSIX platforms, so omit Windows-specific
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ parts/
doc/_build
htmlcov/
.coverage
coverage.xml
nosetests.xml
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ commands =
# So, we uninstall that from the environment, and then install the editable
# version, before running nosetests.
pip uninstall -y ZConfig
pip install -e .
pip install -e .[test]
nosetests --with-xunit --with-xcoverage
deps =
nose
Expand Down

0 comments on commit 03b73b5

Please sign in to comment.