mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
#10273: Rename assertRegexpMatches and assertRaisesRegexp to assertRegex and assertRaisesRegex.
This commit is contained in:
parent
f10c400b91
commit
ed3a7d2d60
21 changed files with 203 additions and 186 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue