From 68cb3e52214c74cec6b94283972db7162f28c8cf Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sat, 7 Nov 2009 10:36:23 -0500 Subject: Use the patch from <> to get Cobertura to find source files. --- coverage/xmlreport.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'coverage') 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. -- cgit v1.2.1