Omit tests from code coverage run
Fine-tune the coverage results by: - Omitting the tests folder from the coverage run. - Added report generation of coverage on the console while tox target run. - Removed and consolidated duplicate switches from run/report commands inside .coveragerc file, which was already present. Change-Id: I5c44e73768487eaefebf95f1dd026ba99b90a04c
This commit is contained in:
@ -1,9 +1,13 @@
|
|||||||
[run]
|
[run]
|
||||||
branch = True
|
branch = True
|
||||||
source = sushy
|
source = sushy
|
||||||
|
omit =
|
||||||
|
*tests*
|
||||||
|
|
||||||
[report]
|
[report]
|
||||||
ignore_errors = True
|
ignore_errors = True
|
||||||
|
omit =
|
||||||
|
*tests*
|
||||||
|
|
||||||
[html]
|
[html]
|
||||||
directory = cover
|
directory = cover
|
||||||
|
5
tox.ini
5
tox.ini
@ -27,14 +27,15 @@ commands = {posargs}
|
|||||||
basepython = python3
|
basepython = python3
|
||||||
setenv =
|
setenv =
|
||||||
{[testenv]setenv}
|
{[testenv]setenv}
|
||||||
PYTHON=coverage run --source sushy --parallel-mode
|
PYTHON=coverage run --parallel-mode
|
||||||
# After running this target, visit sushy/cover/index.html
|
# After running this target, visit sushy/cover/index.html
|
||||||
# in your browser, to see a nicer presentation report with annotated
|
# in your browser, to see a nicer presentation report with annotated
|
||||||
# HTML listings detailing missed lines.
|
# HTML listings detailing missed lines.
|
||||||
commands = coverage erase
|
commands = coverage erase
|
||||||
stestr run {posargs}
|
stestr run {posargs}
|
||||||
coverage combine
|
coverage combine
|
||||||
coverage html -d cover
|
coverage report
|
||||||
|
coverage html
|
||||||
coverage xml -o cover/coverage.xml
|
coverage xml -o cover/coverage.xml
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
|
Reference in New Issue
Block a user