summaryrefslogtreecommitdiff
path: root/coverage/xmlreport.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-11-26 21:32:11 -0500
committerNed Batchelder <ned@nedbatchelder.com>2009-11-26 21:32:11 -0500
commitdba6da49995e88d475d2474e9ebcbfa3fbed8c35 (patch)
treeaa99dc041cb74a835af02ee20e4496f3406aabc4 /coverage/xmlreport.py
parented64454adc109d4905e1e64c568bccbc93679998 (diff)
downloadpython-coveragepy-dba6da49995e88d475d2474e9ebcbfa3fbed8c35.tar.gz
Line lengths
Diffstat (limited to 'coverage/xmlreport.py')
-rw-r--r--coverage/xmlreport.py8
1 files changed, 5 insertions, 3 deletions
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