diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-08 13:50:05 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-08 13:50:05 -0500 |
commit | 8f6da482a2bef7a22a2d704eab98150f40b07211 (patch) | |
tree | 540eff56492b2f91797048d939fdc88f1d5c320e /coverage/results.py | |
parent | 5ebfcb2f451bbb4c88072e2da996cfc2729640d8 (diff) | |
download | python-coveragepy-8f6da482a2bef7a22a2d704eab98150f40b07211.tar.gz |
Shouldn't count multiple (-1,x) arcs as branches.
Diffstat (limited to 'coverage/results.py')
-rw-r--r-- | coverage/results.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/coverage/results.py b/coverage/results.py index 138782e..59cc1fa 100644 --- a/coverage/results.py +++ b/coverage/results.py @@ -98,6 +98,8 @@ class Analysis(object): """Returns lines that have more than one exit.""" exit_counts = {} for l1,l2 in self.arc_possibilities(): + if l1 == -1: + continue if l1 not in exit_counts: exit_counts[l1] = 0 exit_counts[l1] += 1 @@ -107,6 +109,8 @@ class Analysis(object): def total_branches(self): exit_counts = {} for l1,l2 in self.arc_possibilities(): + if l1 == -1: + continue if l1 not in exit_counts: exit_counts[l1] = 0 exit_counts[l1] += 1 |