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
commit33ff69639526d445e6466bb7ce7e75fa8f8dfdf1 (patch)
tree201ab302d02110cdb9385cea6f550cff3970825a /coverage/xmlreport.py
parentc4b8bbcc019167cc72bf03aa6842630e27d54b97 (diff)
downloadpython-coveragepy-33ff69639526d445e6466bb7ce7e75fa8f8dfdf1.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 82d06f6..7fb2ba6 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