Enable python coverage

This commit enables python coverage and adds gitignore files for it.

Change-Id: I6bfc62f532227b1812dabcade34575b86bb8d32d
This commit is contained in:
Masayuki Igawa 2016-01-29 18:45:32 +09:00
parent d87edc944c
commit 80edd06fd0
3 changed files with 10 additions and 2 deletions

7
.coveragerc Normal file
View File

@ -0,0 +1,7 @@
[run]
branch = True
source = openstack_health
omit = openstack_health/tests/*,test/*
[report]
ignore_errors = True

3
.gitignore vendored
View File

@ -29,7 +29,8 @@ lib64
pip-log.txt
# Unit test / coverage reports
.coverage
.coverage*
!.coveragerc
.tox
nosetests.xml
.testrepository

View File

@ -26,7 +26,7 @@ commands =
flake8 {toxinidir}/openstack_health {posargs}
[testenv:cover]
commands = python setup.py testr --coverage {posargs}
commands = python setup.py testr --coverage --coverage-package-name='openstack_health' --testr-args={posargs}
[flake8]
# E125 is a won't fix until https://github.com/jcrocholl/pep8/issues/126 is resolved. For further detail see https://review.openstack.org/#/c/36788/