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
commitfb0f7a159ce5277bd53b253d75a3c7846ce8a5c2 (patch)
tree5d65371b5c91814ac991f0407ea1ef6c813f750e /tests/test_xml.py
parent3449f99bd3cafcca08c619bc9aeacf198a873a27 (diff)
downloadpython-coveragepy-fb0f7a159ce5277bd53b253d75a3c7846ce8a5c2.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 d7611eb..b9b36ef 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