From dba6da49995e88d475d2474e9ebcbfa3fbed8c35 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 26 Nov 2009 21:32:11 -0500 Subject: Line lengths --- coverage/xmlreport.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'coverage/xmlreport.py') diff --git a/coverage/xmlreport.py b/coverage/xmlreport.py index f3a9b9c..9cc6567 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 -- cgit v1.2.1