summaryrefslogtreecommitdiff
path: root/tests/test_xml.py
diff options
context:
space:
mode:
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