diff options
Diffstat (limited to 'coverage/xmlreport.py')
-rw-r--r-- | coverage/xmlreport.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/coverage/xmlreport.py b/coverage/xmlreport.py index 26ac02ad..f5a4c1ba 100644 --- a/coverage/xmlreport.py +++ b/coverage/xmlreport.py @@ -4,7 +4,6 @@ import os, sys, time import xml.dom.minidom from coverage import __url__, __version__ -from coverage.backward import sorted, rpartition # pylint: disable=W0622 from coverage.report import Reporter def rate(hit, num): @@ -97,7 +96,7 @@ class XmlReporter(Reporter): # Create the 'lines' and 'package' XML elements, which # are populated later. Note that a package == a directory. - package_name = rpartition(cu.name, ".")[0] + package_name = cu.name.rpartition(".")[0] className = cu.name package = self.packages.setdefault(package_name, [{}, 0, 0, 0, 0]) @@ -138,8 +137,8 @@ class XmlReporter(Reporter): class_hits = class_lines - len(analysis.missing) if self.arcs: - class_branches = sum([t for t,k in branch_stats.values()]) - missing_branches = sum([t-k for t,k in branch_stats.values()]) + class_branches = sum(t for t, k in branch_stats.values()) + missing_branches = sum(t - k for t, k in branch_stats.values()) class_br_hits = class_branches - missing_branches else: class_branches = 0.0 |