# HG changeset patch # Parent 9b652e0239b502fe9dad1edf65038b67b8c27558 Issue #27100: assertRaisesRegexp() is deprecated diff -r 9b652e0239b5 -r a907ebbfe456 Lib/test/test_with.py --- a/Lib/test/test_with.py Thu Nov 24 03:02:27 2016 +0000 +++ b/Lib/test/test_with.py Thu Nov 24 04:06:35 2016 +0000 @@ -117,7 +117,7 @@ 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 @@ 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 @@ def fooLacksExit(): foo = LacksExit() with foo: pass - self.assertRaisesRegexp(AttributeError, '__exit__', fooLacksExit) + self.assertRaisesRegex(AttributeError, '__exit__', fooLacksExit) def assertRaisesSyntaxError(self, codestr): def shouldRaiseSyntaxError(s):