From 8b5d191386350d28a0f20283dcb366cf50f82b97 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Mon, 16 Jul 2018 22:38:28 -0700 Subject: [PATCH] bpo-33967: Fix wrong use of assertRaises (GH-8306) (cherry picked from commit 56d8f57b83a37b05a6f2fbc3e141bbc1ba6cb3a2) Co-authored-by: INADA Naoki --- Lib/test/test_functools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py index 86ed9d52e1..af02e8d1d5 100644 --- a/Lib/test/test_functools.py +++ b/Lib/test/test_functools.py @@ -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__': -- 2.50.1