diff options
Diffstat (limited to 'coverage/xmlreport.py')
-rw-r--r-- | coverage/xmlreport.py | 5 |
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 |