summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3/tests
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-06-12 06:08:29 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-06-12 06:08:29 (GMT)
commit50d4c15ba78615ce5a8e05a0ae665570fd249463 (patch)
tree6da9a1059bcd4bf2c6efd195be77d843cbb16ef2 /Lib/lib2to3/tests
parent52855452711eb2df1900470d387b58dede3ac941 (diff)
parentd4704803b95efea847cd0a9065818d771c9941fb (diff)
downloadcpython-50d4c15ba78615ce5a8e05a0ae665570fd249463.zip
cpython-50d4c15ba78615ce5a8e05a0ae665570fd249463.tar.gz
cpython-50d4c15ba78615ce5a8e05a0ae665570fd249463.tar.bz2
Issue #27030: Merge RE fix from 3.5
Diffstat (limited to 'Lib/lib2to3/tests')
-rw-r--r--Lib/lib2to3/tests/test_refactor.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/lib2to3/tests/test_refactor.py b/Lib/lib2to3/tests/test_refactor.py
index ab5ce727..94dc135 100644
--- a/Lib/lib2to3/tests/test_refactor.py
+++ b/Lib/lib2to3/tests/test_refactor.py
@@ -8,6 +8,7 @@ import sys
import os
import codecs
import io
+import re
import tempfile
import shutil
import unittest
@@ -222,8 +223,8 @@ from __future__ import print_function"""
actually_write=False)
# Testing that it logged this message when write=False was passed is
# sufficient to see that it did not bail early after "No changes".
- message_regex = r"Not writing changes to .*%s%s" % (
- os.sep, os.path.basename(test_file))
+ message_regex = r"Not writing changes to .*%s" % \
+ re.escape(os.sep + os.path.basename(test_file))
for message in debug_messages:
if "Not writing changes" in message:
self.assertRegex(message, message_regex)