diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-08 17:57:40 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-08 17:57:40 -0500 |
commit | c690a7f0dd1ccf232bb54202ce1a610f2f4e4269 (patch) | |
tree | 0e7a4a18cfc57ce36ec20b5c5a9bbbeebe069178 /coverage/parser.py | |
parent | 085c95e6d2c1c497a6eb008574ffceb65916841a (diff) | |
download | python-coveragepy-c690a7f0dd1ccf232bb54202ce1a610f2f4e4269.tar.gz |
Don't include excluded lines when reporting exit counts.
Diffstat (limited to 'coverage/parser.py')
-rw-r--r-- | coverage/parser.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/coverage/parser.py b/coverage/parser.py index 4890aa6..ee07c20 100644 --- a/coverage/parser.py +++ b/coverage/parser.py @@ -195,11 +195,18 @@ class CodeParser(object): return sorted(all_arcs) def exit_counts(self): - """Return a dict mapping line numbers to number of exits from that line.""" + """Get a mapping from line numbers to count of exits from that line. + + Excluded lines are excluded. + + """ + excluded_lines = self.first_lines(self.excluded) exit_counts = {} for l1,l2 in self.arcs(): if l1 == -1: continue + if l1 in excluded_lines: + continue if l1 not in exit_counts: exit_counts[l1] = 0 exit_counts[l1] += 1 |