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:
parent
ec6e6c1df1
commit
7ee490cc0a
@ -1,9 +1,13 @@
|
||||
[run]
|
||||
branch = True
|
||||
source = sushy
|
||||
omit =
|
||||
*tests*
|
||||
|
||||
[report]
|
||||
ignore_errors = True
|
||||
omit =
|
||||
*tests*
|
||||
|
||||
[html]
|
||||
directory = cover
|
||||
|
5
tox.ini
5
tox.ini
@ -27,14 +27,15 @@ commands = {posargs}
|
||||
basepython = python3
|
||||
setenv =
|
||||
{[testenv]setenv}
|
||||
PYTHON=coverage run --source sushy --parallel-mode
|
||||
PYTHON=coverage run --parallel-mode
|
||||
# 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
|
||||
stestr run {posargs}
|
||||
coverage combine
|
||||
coverage html -d cover
|
||||
coverage report
|
||||
coverage html
|
||||
coverage xml -o cover/coverage.xml
|
||||
|
||||
[testenv:docs]
|
||||
|
Loading…
Reference in New Issue
Block a user