diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-08 17:38:51 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-08 17:38:51 -0500 |
commit | 085c95e6d2c1c497a6eb008574ffceb65916841a (patch) | |
tree | 84aba273f31ed338577c4650689683e2079333ae /coverage/results.py | |
parent | 266ed2154d27c212f5189b1e4c80e5f6494c358b (diff) | |
download | python-coveragepy-085c95e6d2c1c497a6eb008574ffceb65916841a.tar.gz |
Dict literals shouldn't count as many different exits.
Diffstat (limited to 'coverage/results.py')
-rw-r--r-- | coverage/results.py | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/coverage/results.py b/coverage/results.py index 59cc1fa..6f4117a 100644 --- a/coverage/results.py +++ b/coverage/results.py @@ -96,25 +96,11 @@ class Analysis(object): def branch_lines(self): """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 - + exit_counts = self.parser.exit_counts() return [l1 for l1,count in exit_counts.items() if count > 1] 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 - + exit_counts = self.parser.exit_counts() return sum([count for count in exit_counts.values() if count > 1]) def missing_branch_arcs(self): |