summaryrefslogtreecommitdiff
path: root/tests/test_xml.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-01-25 19:08:04 -0500
committerNed Batchelder <ned@nedbatchelder.com>2015-01-25 19:08:04 -0500
commit9cda91b74699517695246f87438ddd2681726f74 (patch)
treea1df1cac27f25e2052102b8059a2cfa4a185bbb7 /tests/test_xml.py
parentee5004ff51d1f86b01fff56ae867f39790c3f98f (diff)
downloadpython-coveragepy-git-9cda91b74699517695246f87438ddd2681726f74.tar.gz
Keep windows working
Diffstat (limited to 'tests/test_xml.py')
-rw-r--r--tests/test_xml.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_xml.py b/tests/test_xml.py
index d7611ebf..b9b36efb 100644
--- a/tests/test_xml.py
+++ b/tests/test_xml.py
@@ -238,8 +238,14 @@ def re_line(text, pat):
def clean(text, scrub=None):
- """Remove any text matching `scrub`, and all leading whitespace."""
+ """Clean text to prepare it for comparison.
+
+ Remove text matching `scrub`, and leading whitespace. Convert backslashes
+ to forward slashes.
+
+ """
if scrub:
text = re.sub(scrub, "", text)
text = re.sub(r"(?m)^\s+", "", text)
+ text = re.sub(r"\\", "/", text)
return text