]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-33967: Remove use of deprecated assertRaisesRegexp() (GH-8261) (GH-8296)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 16 Jul 2018 09:40:11 +0000 (02:40 -0700)
committerVictor Stinner <vstinner@redhat.com>
Mon, 16 Jul 2018 09:40:11 +0000 (11:40 +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 e325480e6c9208e0eea8a04eaaf36466d3278305..93f2800a3c70dd7fc7adb8f31e283a5fd577ebbb 100644 (file)
@@ -2192,7 +2192,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__':