NoSource: No source for code: 'path/to/C/extension/pyexpat.c' (coverage==4.0)

Issue #419 resolved
Damien Nozay created an issue

coverage==3.7.1 => pass

coverage==4.0 => fail

coverage html --omit=.tox/* No source for code: '/tmp/python-build.20150204184146.6052/Python-2.7.9/Modules/pyexpat.c'.

My point is that with version 4.0 it now tries to get coverage for C extensions; which I guess it didn't in 3.7.1. Is there a simple way to ignore C extension code?

Comments (5)

  1. Ned Batchelder repo owner

    Ugh, this is stupid pyexpat calling the trace function explicitly. It's the worst thing ever, and I guess I'll have to special case it somehow...

  2. Ned Batchelder repo owner

    Hmm, there are two different errors, depending on if the pyexpat.c file couldn't be found (NoSource), or was found and then couldn't be parsed as Python (NotPython). In the NotPython case, we suppress the error, but in the NoSource case we don't.

  3. Log in to comment