src/eric7/DebugClients/Python/coverage/jsonreport.py

branch
eric7
changeset 9374
ed79209469ad
parent 9209
b99e7fd55fd3
diff -r e074358157f4 -r ed79209469ad src/eric7/DebugClients/Python/coverage/jsonreport.py
--- a/src/eric7/DebugClients/Python/coverage/jsonreport.py	Sat Oct 01 17:30:55 2022 +0200
+++ b/src/eric7/DebugClients/Python/coverage/jsonreport.py	Sat Oct 01 17:37:10 2022 +0200
@@ -102,4 +102,17 @@
                 'covered_branches': nums.n_executed_branches,
                 'missing_branches': nums.n_missing_branches,
             })
+            reported_file['executed_branches'] = list(
+                _convert_branch_arcs(analysis.executed_branch_arcs())
+            )
+            reported_file['missing_branches'] = list(
+                _convert_branch_arcs(analysis.missing_branch_arcs())
+            )
         return reported_file
+
+
+def _convert_branch_arcs(branch_arcs):
+    """Convert branch arcs to a list of two-element tuples."""
+    for source, targets in branch_arcs.items():
+        for target in targets:
+            yield source, target

eric ide

mercurial