diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-07 10:36:23 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-11-07 10:36:23 -0500 |
commit | 68cb3e52214c74cec6b94283972db7162f28c8cf (patch) | |
tree | cd7b87933602246c8ad9186ba83f8220c1a4adae /coverage/xmlreport.py | |
parent | 625415c2b0bd34a3c0efd814cc68108566c508e1 (diff) | |
download | python-coveragepy-git-68cb3e52214c74cec6b94283972db7162f28c8cf.tar.gz |
Use the patch from <<issue 23>> to get Cobertura to find source files.
Diffstat (limited to 'coverage/xmlreport.py')
-rw-r--r-- | coverage/xmlreport.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/coverage/xmlreport.py b/coverage/xmlreport.py index 155f7bf5..0fe43712 100644 --- a/coverage/xmlreport.py +++ b/coverage/xmlreport.py @@ -97,7 +97,8 @@ class XmlReporter(Reporter): xclass.appendChild(xlines) className = fname.replace('.', '_') xclass.setAttribute("name", className) - xclass.setAttribute("filename", os.path.split(cu.filename)[1]) + ext = os.path.splitext(cu.filename)[1] + xclass.setAttribute("filename", cu.name + ext) xclass.setAttribute("complexity", "0.0") # For each statement, create an XML 'line' element. |