Make coverage tests work
The default package name for coverage doesn't work, so we need to explicitly state it in tox.ini. We should also exclude the tests directory as that code will typically be 100% tested, and if it's not we don't really care. Also excludes the coverage results from git so it doesn't show up in git status. Change-Id: I9e99b2c7c215a5de3c76cb2daf0f468f445774c3
This commit is contained in:
parent
a7841162ff
commit
170c0a9eb2
@ -1,7 +1,7 @@
|
||||
[run]
|
||||
branch = True
|
||||
source = tripleo_common
|
||||
omit = tripleo_common/openstack/*
|
||||
omit = tripleo_common/tests/*
|
||||
|
||||
[report]
|
||||
ignore_errors = True
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -23,6 +23,7 @@ pip-log.txt
|
||||
|
||||
# Unit test / coverage reports
|
||||
.coverage
|
||||
cover
|
||||
.tox
|
||||
nosetests.xml
|
||||
.testrepository
|
||||
|
2
tox.ini
2
tox.ini
@ -19,7 +19,7 @@ commands = flake8
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:cover]
|
||||
commands = python setup.py test --coverage --testr-args='{posargs}'
|
||||
commands = python setup.py test --coverage --coverage-package-name=tripleo_common --testr-args='{posargs}'
|
||||
|
||||
[testenv:docs]
|
||||
commands = python setup.py build_sphinx
|
||||
|
Loading…
Reference in New Issue
Block a user