summaryrefslogtreecommitdiff
path: root/coverage/xmlreport.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2012-11-21 21:44:09 -0500
committerNed Batchelder <ned@nedbatchelder.com>2012-11-21 21:44:09 -0500
commit43cc4830ccc2ef54cd12e0fcc13561ffea025bb1 (patch)
tree93ec121eac3d5e2fc1c08561fb384f758f71d646 /coverage/xmlreport.py
parentc97ab5ffc039d9d35b2f03992d4d9a185fd16f2b (diff)
downloadpython-coveragepy-git-43cc4830ccc2ef54cd12e0fcc13561ffea025bb1.tar.gz
XML filename paths get slashes on all platforms.
Diffstat (limited to 'coverage/xmlreport.py')
-rw-r--r--coverage/xmlreport.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/coverage/xmlreport.py b/coverage/xmlreport.py
index fc16f100..1991d739 100644
--- a/coverage/xmlreport.py
+++ b/coverage/xmlreport.py
@@ -106,7 +106,8 @@ class XmlReporter(Reporter):
xclass.appendChild(xlines)
xclass.setAttribute("name", className)
- xclass.setAttribute("filename", cu.file_locator.relative_filename(cu.filename))
+ filename = cu.file_locator.relative_filename(cu.filename)
+ xclass.setAttribute("filename", filename.replace("\\", "/"))
xclass.setAttribute("complexity", "0")
branch_stats = analysis.branch_stats()