Commit 5b143b55 authored by Raymond Hettinger's avatar Raymond Hettinger

Issue #27100: Silence deprecation warning in Lib/test/test_with.py

parent 39a3e9dc
......@@ -117,7 +117,7 @@ class FailureTestCase(unittest.TestCase):
def fooLacksEnter():
foo = LacksEnter()
with foo: pass
self.assertRaisesRegexp(AttributeError, '__enter__', fooLacksEnter)
self.assertRaisesRegex(AttributeError, '__enter__', fooLacksEnter)
def testEnterAttributeError2(self):
class LacksEnterAndExit(object):
......@@ -126,7 +126,7 @@ class FailureTestCase(unittest.TestCase):
def fooLacksEnterAndExit():
foo = LacksEnterAndExit()
with foo: pass
self.assertRaisesRegexp(AttributeError, '__enter__', fooLacksEnterAndExit)
self.assertRaisesRegex(AttributeError, '__enter__', fooLacksEnterAndExit)
def testExitAttributeError(self):
class LacksExit(object):
......@@ -136,7 +136,7 @@ class FailureTestCase(unittest.TestCase):
def fooLacksExit():
foo = LacksExit()
with foo: pass
self.assertRaisesRegexp(AttributeError, '__exit__', fooLacksExit)
self.assertRaisesRegex(AttributeError, '__exit__', fooLacksExit)
def assertRaisesSyntaxError(self, codestr):
def shouldRaiseSyntaxError(s):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment