#10273: Rename assertRegexpMatches and assertRaisesRegexp to assertRegex and assertRaisesRegex.
diff --git a/Lib/test/test_runpy.py b/Lib/test/test_runpy.py
index 94e47d6..ad3ab39 100644
--- a/Lib/test/test_runpy.py
+++ b/Lib/test/test_runpy.py
@@ -329,7 +329,7 @@
def _check_import_error(self, script_name, msg):
msg = re.escape(msg)
- self.assertRaisesRegexp(ImportError, msg, run_path, script_name)
+ self.assertRaisesRegex(ImportError, msg, run_path, script_name)
def test_basic_script(self):
with temp_dir() as script_dir:
@@ -403,7 +403,7 @@
script_name = self._make_test_script(script_dir, mod_name, source)
zip_name, fname = make_zip_script(script_dir, 'test_zip', script_name)
msg = "recursion depth exceeded"
- self.assertRaisesRegexp(RuntimeError, msg, run_path, zip_name)
+ self.assertRaisesRegex(RuntimeError, msg, run_path, zip_name)