Issue #13 new
Kenneth Knowles
created an issue


I would love to have access to branch coverage.

I tried this by replacing



the_coverage = coverage.coverage(branch=True)

But I just got 0% coverage everywhere then. Presumably I need to do something else while instantiating, or maybe I had some other problem, but I figured you may be able to solve this very quickly and easily. I am not sure if this should be activated by adding an option to or by supporting .coveragerc completely (it seems to be ignored?)

  • Kenn

Comments (1)

  1. Adrián López Calvo


    I "almost" fixed this in my fork, but it breaks the custom html report. It's because it uses the old module API (see comment here) which doesn't support branch coverage.

    I'm trying to fix it prior to a pull request, but I don't understand ModuleVars and I'd need to replace the call to analysis2() done there.

    Any info on this Mikhail? How can I provide a coverage instance to ModuleVars? It seems some kind of singleton or cache and I don't want to mess it.


    Ok, I think I got it. It doesn't crash now but branches aren't implemented in the custom html. I'm going to stop here since I'm not really interested in the custom export.

    Many thanks,


  2. Log in to comment