]> granicus.if.org Git - python/commitdiff
bpo-33967: Fix wrong use of assertRaises (GH-8306)
authorINADA Naoki <methane@users.noreply.github.com>
Tue, 17 Jul 2018 04:44:47 +0000 (13:44 +0900)
committerGitHub <noreply@github.com>
Tue, 17 Jul 2018 04:44:47 +0000 (13:44 +0900)
Lib/test/test_functools.py

index 63149d54082a78e582c37bfd903340e36f588db3..10bf0a2aa8954274ccc7a63c4178f58eac06d3dd 100644 (file)
@@ -2310,7 +2310,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__':