[Python-Dev] C code coverage report with lcov

Brett Cannon brett at python.org
Mon Jul 29 21:38:54 CEST 2013


On Mon, Jul 29, 2013 at 3:31 PM, Christian Heimes <christian at python.org>wrote:

> Am 29.07.2013 19:58, schrieb Brett Cannon:
> > I took a quick poke around and it seems some things are legitimately not
> > being executed, while others are error conditions that we wouldn't
> > expect to occur (e.g. memory exhaustion). If we ever decide to get
> > serious about code coverage (both C and Python code) we may need to have
> > a discussion as a group about our feelings related to pragmas dictating
> > when code should be left out of coverage reports.
>
> Yeah, object allocation and creation checks as well as verification of
> operating system API call are reason for lots branch and line misses.
> I'm not sure what we can do about that. I don't want to plaster the code
> with LCOV_EXCL_LINE comments.
>
> As first action we should look into function coverage. We may not be
> able to execute every branch but at least we should be able to call and
> verify each function.
>

If there's a way to report just function coverage then I think that's a
great place to start.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20130729/9dda47d0/attachment.html>


More information about the Python-Dev mailing list