[TIP] What to do when `coverage` says "no source for code"?

cool-RR cool-rr at cool-rr.com
Wed Dec 1 15:16:12 PST 2010


Hello,

I'm running nose with the `--with-coverage` plugin, with a flag
`--cover-package:garlicsim,garlicsim_lib,garlicsim_wx` . No problems there.
After that I run `coverage html` to make the report, but then I get an
error:

"""
No source for code: '/home/coolrr/Desktop/GarlicSim/garlicsim/shared.py'
"""

Then it doesn't produce a report at all.

This `shared.py` is a file that doesn't exists. I searched my source code
for something that could be trying to import it but didn't find anything.
Also all my tests are passing so if something tried to import this fictional
file it would have failed.

What's going on? I will note that I have files called `shared.py` in various
places in my test packages, but definitely not in `GarlicSim/garlicsim`.


Thanks,
Ram.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20101202/b0e3fad1/attachment.htm>


More information about the testing-in-python mailing list