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

Alexander Todorov atodorov at redhat.com
Wed Feb 12 03:47:57 PST 2014

I think I've figure it out.

Adding source=['/usr/sbin/anaconda', 'pyanaconda'] produced the results I 
wanted. Without it I see coverage report for all other external modules loaded 
by anaconda but not pyanaconda (which is also in site-packages).

Can you explain why this is happening ?

If you'd still like to run the code try this:

1) Get a Fedora 20 DVD
2) Follow the instructions at

to build an updates.img   with the patch from


or alternatively use these (Fedora 20, x86_64):

3) Start the installer (in a virtual machine) and add to the boot command line

4) Perform a default installation

5) After install is complete and system has rebooted there should be a 
/root/anaconda.coverage file.

Try both updates.img and see the differences in the coverage results.

More information about the testing-in-python mailing list