[TIP] Using coverage from API and command line gives different results

Ned Batchelder ned at nedbatchelder.com
Wed Feb 12 02:45:45 PST 2014

On 2/12/14 4:14 AM, Alexander Todorov wrote:
> На 12.02.2014 03:44, Ned Batchelder написа:
>>> On a larger project I'm trying to integrate coverage with I see 
>>> exactly the
>>> opposite - the main program file is included in the report while the 
>>> modules
>>> it includes are not (not all of them). All modules are in 
>>> site-packages.
> >
>> This sound like a separate problem, perhaps your modules are imported 
>> before
>> coverage starts?
> Hi Ned,
> I've made sure the first thing to be imported is coverage and then 
> right after call .start(). Everything else goes afterwards.
> How do I go about figuring out what's happening ? Where should I look ?
The simplest thing to do is to use coverage to run your tests.  This is 
much easier than using the API, and will make sure all goes well.
> The larger piece of code I'm talking about is the Fedora installer. If 
> you'd like to take a look I can tell you how to test, it's relatively 
> easy.
Give us a pointer to the code with detailed instructions of how to run it.

> Thanks,
> Alex

More information about the testing-in-python mailing list