Skip to content

Commit

Permalink
fix: executed_branch_arcs should limit itself to parsed possible arcs
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Sep 25, 2024
1 parent a6c26f2 commit 77ee8f2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions coverage/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ def missing_branch_arcs(self) -> dict[TLineNo, list[TLineNo]]:
def executed_branch_arcs(self) -> dict[TLineNo, list[TLineNo]]:
"""Return arcs that were executed from branch lines.
Only include ones that we considered possible.
Returns {l1:[l2a,l2b,...], ...}
"""
Expand All @@ -219,6 +221,8 @@ def executed_branch_arcs(self) -> dict[TLineNo, list[TLineNo]]:
for l1, l2 in self.arcs_executed:
if l1 == l2:
continue
if (l1, l2) not in self.arc_possibilities_set:
continue
if l1 in branch_lines:
eba[l1].append(l2)
return eba
Expand Down

0 comments on commit 77ee8f2

Please sign in to comment.