diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..695c37e --- /dev/null +++ b/.coveragerc @@ -0,0 +1,4 @@ +[run] +omit = + /usr/* + tests/* diff --git a/docs/devguide.rst b/docs/devguide.rst index ef27a0f..a36f74e 100644 --- a/docs/devguide.rst +++ b/docs/devguide.rst @@ -32,6 +32,18 @@ When you need a proxy to access the internet, add:: 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 -------------------