Python test coverage readout

Matthew Selsky Matthew.Selsky at twosigma.com
Mon Jan 8 21:55:00 UTC 2018


On Fri, Jan 05, 2018 at 11:37:15AM -0500, Matthew Selsky wrote:
> 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?
> 
> See https://coverage.readthedocs.io/ for general docs.

Ian:

report -m shows exactly which lines are missing coverage.

$ coverage report -m
Name                      Stmts   Miss  Cover   Missing
-------------------------------------------------------
my_program.py                20      4    80%   33-35, 39
my_other_module.py           56      6    89%   17-23
-------------------------------------------------------
TOTAL                        76     10    87%

We should be able to use that information to get our python test coverage to 100%.


Thanks,
-Matt


More information about the devel mailing list