summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/test_farm.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_farm.py b/tests/test_farm.py
index 92bd968a..d8d4c0fa 100644
--- a/tests/test_farm.py
+++ b/tests/test_farm.py
@@ -228,8 +228,8 @@ class FarmTestCase(object):
without triggering an assertion. `right_extra` means the right
directory can.
- `scrubs` is a list of pairs, regex find and replace patterns to use to
- scrub the files of unimportant differences.
+ `scrubs` is a list of pairs, regexes to find and literal strings to
+ replace them with to scrub the files of unimportant differences.
An assertion will be raised if the directories fail one of their
matches.
@@ -309,7 +309,7 @@ class FarmTestCase(object):
"""
for rgx_find, rgx_replace in scrubs:
- strdata = re.sub(rgx_find, rgx_replace, strdata)
+ strdata = re.sub(rgx_find, re.escape(rgx_replace), strdata)
return strdata
def contains(self, filename, *strlist):