changeset: 105351:e11df6aa5bf1 branch: 3.6 parent: 105349:5a29ab5a4785 user: Raymond Hettinger date: Thu Nov 24 10:50:34 2016 -0800 files: Lib/test/test_with.py description: Issue #27100: Silence deprecation warning in Lib/test/test_with.py diff -r 5a29ab5a4785 -r e11df6aa5bf1 Lib/test/test_with.py --- a/Lib/test/test_with.py Thu Nov 24 17:20:40 2016 +0900 +++ b/Lib/test/test_with.py Thu Nov 24 10:50:34 2016 -0800 @@ -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):