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 | e2de44ad1f1670a9e78db69a1f362bcd7b2484d7 (patch) | |
tree | d2229fd1fe5433ed91eb1f260ee8576995769b4f /coverage/results.py | |
parent | 824ca447ec8a5f803bc4bf6aa0d80cc90f1cf3df (diff) | |
download | python-coveragepy-git-e2de44ad1f1670a9e78db69a1f362bcd7b2484d7.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 138782e6..59cc1fa9 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 |