]> granicus.if.org Git - python/commitdiff
bpo-33967: Remove use of deprecated assertRaisesRegexp() (GH-8261) (GH-8295)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 16 Jul 2018 09:26:49 +0000 (02:26 -0700)
committerVictor Stinner <vstinner@redhat.com>
Mon, 16 Jul 2018 09:26:49 +0000 (11:26 +0200)
It was added in test_functools at 445f1b3.
(cherry picked from commit 9e9b2c32a34594e901b5b9a03c561a2a2bf63ece)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Lib/test/test_functools.py

index 5e454dd9abc2971898a1c3da642d465a732178a4..86ed9d52e1b4b6a0d33b938a70f14c1428cad68d 100644 (file)
@@ -2083,7 +2083,7 @@ class TestSingleDispatch(unittest.TestCase):
         def f(*args):
             pass
         msg = 'f requires at least 1 positional argument'
-        with self.assertRaisesRegexp(TypeError, msg):
+        with self.assertRaises(TypeError, msg=msg):
             f()
 
 if __name__ == '__main__':