summaryrefslogtreecommitdiff
path: root/coverage/xmlreport.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-09-23 20:47:27 -0400
committerNed Batchelder <ned@nedbatchelder.com>2009-09-23 20:47:27 -0400
commitc0f54c80150b65d650e85339e98c17d025625d24 (patch)
tree46286e75bdf3791cfdbe786d476032f81ca76fb5 /coverage/xmlreport.py
parente3ff72a32401f97b4e3f8e627780c87366d62414 (diff)
downloadpython-coveragepy-git-c0f54c80150b65d650e85339e98c17d025625d24.tar.gz
Some XML report fixes, and a very basic test.
Diffstat (limited to 'coverage/xmlreport.py')
-rw-r--r--coverage/xmlreport.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/coverage/xmlreport.py b/coverage/xmlreport.py
index 82d06f6b..7fb2ba67 100644
--- a/coverage/xmlreport.py
+++ b/coverage/xmlreport.py
@@ -48,7 +48,7 @@ class XmlReporter(Reporter):
c.appendChild(lines)
className = fname.replace('.', '_')
c.setAttribute("name", className)
- c.setAttribute("filename", cu.name)
+ c.setAttribute("filename", cu.filename)
c.setAttribute("complexity", "0.0")
try:
@@ -62,8 +62,7 @@ class XmlReporter(Reporter):
# Q: can we get info about the number of times
# a statement is executed? If so, that should be
# recorded here.
- if not line in missing:
- l.setAttribute("hits", str(1))
+ l.setAttribute("hits", str(int(not line in missing)))
# Q: can we get info about whether this statement
# is a branch? If so, that data should be