#10273: Rename assertRegexpMatches and assertRaisesRegexp to assertRegex and assertRaisesRegex.

This commit is contained in:
Ezio Melotti 2010-12-01 02:32:32 +00:00
parent f10c400b91
commit ed3a7d2d60
21 changed files with 203 additions and 186 deletions

View file

@ -354,14 +354,14 @@ class CodeInfoTests(unittest.TestCase):
def test_code_info(self):
self.maxDiff = 1000
for x, expected in self.test_pairs:
self.assertRegexpMatches(dis.code_info(x), expected)
self.assertRegex(dis.code_info(x), expected)
def test_show_code(self):
self.maxDiff = 1000
for x, expected in self.test_pairs:
with captured_stdout() as output:
dis.show_code(x)
self.assertRegexpMatches(output.getvalue(), expected+"\n")
self.assertRegex(output.getvalue(), expected+"\n")
def test_main():
run_unittest(DisTests, CodeInfoTests)