Fix coverage report generation with tox

Previously no coverage report was produced as the package name was
confusing the coverage module. We were also using the wrong command.

This also adds a coveragerc so that the results are sane.

Change-Id: I204f52eeae71ac11274431f9cdf518d19e42f94b
This commit is contained in:
Clint Byrum 2014-06-02 18:29:27 -07:00
parent 96248ee8a7
commit 69bd587667
2 changed files with 8 additions and 1 deletions

7
.coveragerc Normal file
View File

@ -0,0 +1,7 @@
[run]
branch = True
source = os_collect_config
omit = os_collect_config/tests/*,os_collect_config/openstack/*
[report]
ignore-errors = True

View File

@ -22,7 +22,7 @@ commands = flake8
[testenv:cover]
setenv = VIRTUAL_ENV={envdir}
commands =
python setup.py testr --coverage
python setup.py test --coverage --coverage-package-name=os_collect_config
[testenv:venv]
commands = {posargs}