summaryrefslogtreecommitdiff
path: root/coverage/xmlreport.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2013-12-13 22:45:10 -0500
committerNed Batchelder <ned@nedbatchelder.com>2013-12-13 22:45:10 -0500
commit2df9b1c35cbb5c92204fc5923368a3d619a34f6d (patch)
treed1ede8ffef812ba4e345b08f698f001ebe69cb56 /coverage/xmlreport.py
parent84221611890880b749dbb650e8d07ac8918dba46 (diff)
parent7c66441eab3af17539c478a2cb4e19cd93ba0cf4 (diff)
downloadpython-coveragepy-git-2df9b1c35cbb5c92204fc5923368a3d619a34f6d.tar.gz
Merged 4.0 to default
Diffstat (limited to 'coverage/xmlreport.py')
-rw-r--r--coverage/xmlreport.py7
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