]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-33967: Fix wrong use of assertRaises (GH-8306)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 17 Jul 2018 05:38:28 +0000 (22:38 -0700)
committerGitHub <noreply@github.com>
Tue, 17 Jul 2018 05:38:28 +0000 (22:38 -0700)
(cherry picked from commit 56d8f57b83a37b05a6f2fbc3e141bbc1ba6cb3a2)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
Lib/test/test_functools.py

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