Python test coverage readout
Matthew.Selsky at twosigma.com
Fri Jan 5 16:37:16 UTC 2018
On Fri, Jan 05, 2018 at 08:17:18AM -0600, Ian Bruene via devel wrote:
> How can I get a detailed report on the new python test coverage check? And how
> robust is it: does it only count the percentage of functions tested, or can it
> tell what parts of a function are being exercised?
> 91% is higher than I expected.....
See https://coverage.readthedocs.io/ for general docs.
https://gitlab.com/NTPsec/ntpsec/commit/3bb4bf5d95f1f23ed95354f744c34f451c3e88bd#587d266bb27a4dc3022bbed44dfa19849df3044c_312_317 has how we run the coverage report as part of Gitlab CI.
See https://coverage.readthedocs.io/en/coverage-4.4.2/branch.html for information on getting code branch-level (eg --branch) stats. The xml output format might have more detail so you can see which functions are not yet covered.
See https://gitlab.com/NTPsec/ntpsec/-/jobs/46838728 for the detailed coverage stats per file of library code.
More information about the devel