'How to get missing branches information in coverage.py html report

Currently I am using coverage.py to get coverage report of python code. I am using --branch flag to get branch coverage in the report. In the html report header I am getting these attributes Module statements missing excluded branches partial coverage I am looking for an attribute which tells the branches_covered from which I can understand how many branches are covered or missed. If I create a JSON report, I can see the details in the summary like

      "summary": {
        "covered_lines": ,
        "num_statements": ,
        "percent_covered": ,
        "percent_covered_display": ,
        "missing_lines": ,
        "excluded_lines": ,
        "num_branches": ,
        "num_partial_branches": ,
        "covered_branches": ,
        "missing_branches": 
      },

But I don't want to create 2 reports, I am trying to get the attribute "covered_branches" in the html report. I am not able to find solution to this yet.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source