summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2012-02-13 22:31:26 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2012-02-13 22:31:26 (GMT)
commit3634bfbee6efa42d4e2a19c869da39051d4e2201 (patch)
treec9e87fb7a137e7c2fda9f5a65bacc4d5b1ff7fa7 /Lib
parent5e4d9087046b9e70b76a86b7fb3fc0ad91452abc (diff)
downloadcpython-3634bfbee6efa42d4e2a19c869da39051d4e2201.zip
cpython-3634bfbee6efa42d4e2a19c869da39051d4e2201.tar.gz
cpython-3634bfbee6efa42d4e2a19c869da39051d4e2201.tar.bz2
lib2to3 tests: Don't use deprecated API, switch to assertRegex()
Diffstat (limited to 'Lib')
-rw-r--r--Lib/lib2to3/tests/test_main.py2
-rw-r--r--Lib/lib2to3/tests/test_refactor.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/lib2to3/tests/test_main.py b/Lib/lib2to3/tests/test_main.py
index 407afa1..a3dbced 100644
--- a/Lib/lib2to3/tests/test_main.py
+++ b/Lib/lib2to3/tests/test_main.py
@@ -94,7 +94,7 @@ class TestMain(unittest.TestCase):
self.assertIn("Writing converted %s to %s" % (
os.path.join(self.py2_src_dir, name),
os.path.join(self.py3_dest_dir, name+suffix)), stderr)
- self.assertRegexpMatches(stderr, r"No changes to .*/__init__\.py")
+ self.assertRegex(stderr, r"No changes to .*/__init__\.py")
self.assertNotRegex(stderr, r"No changes to .*/trivial\.py")
def test_filename_changing_on_output_two_files(self):
diff --git a/Lib/lib2to3/tests/test_refactor.py b/Lib/lib2to3/tests/test_refactor.py
index 4b87ed6..8bdebc1 100644
--- a/Lib/lib2to3/tests/test_refactor.py
+++ b/Lib/lib2to3/tests/test_refactor.py
@@ -230,7 +230,7 @@ from __future__ import print_function"""
os.sep, os.path.basename(test_file))
for message in debug_messages:
if "Not writing changes" in message:
- self.assertRegexpMatches(message, message_regex)
+ self.assertRegex(message, message_regex)
break
else:
self.fail("%r not matched in %r" % (message_regex, debug_messages))