Refining test coverage
This patch excludes the test artifacts from coverage results. It uses coverage lib, already included in test-requirements, to put the coverage results in 'cover' folder and displays the report as well as part of tox `cover` target. Change-Id: Ib6dd8558dc5db4025b27c660690d0c31fd983367
This commit is contained in:
parent
37fcd7ef8f
commit
44cd454dbd
@ -4,3 +4,6 @@ source = sushy
|
|||||||
|
|
||||||
[report]
|
[report]
|
||||||
ignore_errors = True
|
ignore_errors = True
|
||||||
|
|
||||||
|
[html]
|
||||||
|
directory = cover
|
||||||
|
8
tox.ini
8
tox.ini
@ -19,7 +19,13 @@ commands = flake8 {posargs}
|
|||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
commands = python setup.py test --coverage --testr-args='{posargs}'
|
# After running this target, visit sushy/cover/index.html
|
||||||
|
# in your browser, to see a nicer presentation report with annotated
|
||||||
|
# HTML listings detailing missed lines.
|
||||||
|
commands = coverage erase
|
||||||
|
python setup.py test --coverage --testr-args='{posargs}'
|
||||||
|
coverage report --omit=*test*
|
||||||
|
coverage html --omit=*test*
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
commands = python setup.py build_sphinx
|
commands = python setup.py build_sphinx
|
||||||
|
Loading…
Reference in New Issue
Block a user