simplify and document how to measure code coverage
This patch configures Coverage.py to measure only the code coverage of kas itself. In addition, we add a note in the devguide how to create and inspect the coverage data. Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
parent
2503ab39cd
commit
27cf5ea897
4
.coveragerc
Normal file
4
.coveragerc
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[run]
|
||||||
|
omit =
|
||||||
|
/usr/*
|
||||||
|
tests/*
|
@ -32,6 +32,18 @@ When you need a proxy to access the internet, add::
|
|||||||
to the call.
|
to the call.
|
||||||
|
|
||||||
|
|
||||||
|
Measure code coverage
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
To measure the code coverage of the unit tests, the ``pytest-cov`` package is
|
||||||
|
required. On Debian systems, this is provided in ``python3-pytest-cov``.
|
||||||
|
Once installed, run::
|
||||||
|
|
||||||
|
$ python3 -m pytest --cov --cov-report html
|
||||||
|
|
||||||
|
The coverage in HTML format can then be found in `htmlcov`.
|
||||||
|
|
||||||
|
|
||||||
Community Resources
|
Community Resources
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user