diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-26 21:32:11 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-26 21:32:11 -0500 |
commit | ab36966c4986b7e14fab933119fd7fee7a4ae729 (patch) | |
tree | 0819c7ddd9606bb7207f236cf70dc27f5b03e1a5 /coverage/xmlreport.py | |
parent | 72b1c5803d59deefb891bf1f5668b7a74160356b (diff) | |
download | python-coveragepy-git-ab36966c4986b7e14fab933119fd7fee7a4ae729.tar.gz |
Line lengths
Diffstat (limited to 'coverage/xmlreport.py')
-rw-r--r-- | coverage/xmlreport.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/coverage/xmlreport.py b/coverage/xmlreport.py index f3a9b9c4..9cc6567a 100644 --- a/coverage/xmlreport.py +++ b/coverage/xmlreport.py @@ -123,10 +123,12 @@ class XmlReporter(Reporter): class_hits = class_lines - len(analysis.missing) if self.arcs: - # We assume here that every branch line has 2 exits, which is usually - # true. In theory, we could have a branch line with more exits.. + # We assume here that every branch line has 2 exits, which is + # usually true. In theory, though, we could have a branch line + # with more exits.. class_branches = 2.0 * len(branch_lines) - missing_branches = sum([len(b) for b in analysis.missing_branch_arcs().values()]) + missed_branch_targets = analysis.missing_branch_arcs().values() + missing_branches = sum([len(b) for b in missed_branch_targets]) class_branch_hits = class_branches - missing_branches else: class_branches = 0.0 |