]> granicus.if.org Git - python/commitdiff
Issue #27100: Silence deprecation warning in Lib/test/test_with.py
authorRaymond Hettinger <python@rcn.com>
Thu, 24 Nov 2016 18:50:34 +0000 (10:50 -0800)
committerRaymond Hettinger <python@rcn.com>
Thu, 24 Nov 2016 18:50:34 +0000 (10:50 -0800)
Lib/test/test_with.py

index cbb85da1541df51c1b5347bcc1063bf9990e278e..c70f6859b4b29d983daf13debec84fbffc9be11d 100644 (file)
@@ -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):