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

Alex Gaynor alex.gaynor at gmail.com
Wed Dec 1 15:23:35 PST 2010


On Wed, Dec 1, 2010 at 6:16 PM, cool-RR <cool-rr at cool-rr.com> wrote:
> 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.
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python
>
>

I filed this bug on that issue:
https://bitbucket.org/ned/coveragepy/issue/98/no-source-for-code I
never did find the bottom of it though.

Alex

-- 
"I disapprove of what you say, but I will defend to the death your
right to say it." -- Voltaire
"The people's good is the highest law." -- Cicero
"Code can always be simpler than you think, but never as simple as you
want" -- Me



More information about the testing-in-python mailing list