diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-09-23 20:47:27 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-09-23 20:47:27 -0400 |
commit | c0f54c80150b65d650e85339e98c17d025625d24 (patch) | |
tree | 46286e75bdf3791cfdbe786d476032f81ca76fb5 /coverage/xmlreport.py | |
parent | e3ff72a32401f97b4e3f8e627780c87366d62414 (diff) | |
download | python-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.py | 5 |
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 |