summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3/tests/test_refactor.py
diff options
context:
space:
mode:
authorLarry Hastings <larry@hastings.org>2016-06-13 03:26:28 (GMT)
committerLarry Hastings <larry@hastings.org>2016-06-13 03:26:28 (GMT)
commit29f963732166260420ffbdebe9eb8b98a009dc8c (patch)
tree17ad6530ee3b66b53647ab70bac08145dcd69783 /Lib/lib2to3/tests/test_refactor.py
parent6e9a96be9e24265638df8aa600e566b306a23a2b (diff)
parent1003b34c71d53ccb88ae2768aaba503ae6b5bc16 (diff)
downloadcpython-29f963732166260420ffbdebe9eb8b98a009dc8c.zip
cpython-29f963732166260420ffbdebe9eb8b98a009dc8c.tar.gz
cpython-29f963732166260420ffbdebe9eb8b98a009dc8c.tar.bz2
Merge 3.5.2rc1 with current 3.5 branch.
Diffstat (limited to 'Lib/lib2to3/tests/test_refactor.py')
-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 f30c1e8..8563001 100644
--- a/Lib/lib2to3/tests/test_refactor.py
+++ b/Lib/lib2to3/tests/test_refactor.py
@@ -9,6 +9,7 @@ import os
import codecs
import operator
import io
+import re
import tempfile
import shutil
import unittest
@@ -226,8 +227,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)