[TIP] Coverage does not cover script if py.test executes it from another directory
bilderbuchi at phononoia.at
Fri Sep 6 05:35:48 PDT 2013
Ned Batchelder schrieb am 06.09.2013 04:36:
> On 9/5/13 6:33 AM, Christoph Buchner wrote:
>> Sure, see attachment. step-by-step instructions in Instructions.txt
> Christoph, when I follow your instructions, I get the same output for
> both commands. They both print "--Contents of arg_file.txt--", and both
> say 0% coverage for my_script.py when the report is generated. I've
> attached the complete output.
> I'll look into why the script isn't measured (and why there's no debug
> message that it isn't being measured), but it's disconcerting that our
> results are different.
this is indeed weird! I'll try this again on my other machine, but I'm pretty sure it showed the same behaviour.
I haven't run my tests in a virtual environment, should I look into setting one up, too, and try again?
I'm already curious what you find out about why the script is not measured, and no debug output about it either!
More information about the testing-in-python