From: Zackery Spytz Date: Thu, 12 Jul 2018 03:57:05 +0000 (-0600) Subject: bpo-33967: Remove use of deprecated assertRaisesRegexp() (GH-8261) X-Git-Tag: v3.8.0a1~1376 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e9b2c32a34594e901b5b9a03c561a2a2bf63ece;p=thirdparty%2FPython%2Fcpython.git bpo-33967: Remove use of deprecated assertRaisesRegexp() (GH-8261) It was added in test_functools at 445f1b3. --- diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py index f9f96bac6d4e..63149d54082a 100644 --- a/Lib/test/test_functools.py +++ b/Lib/test/test_functools.py @@ -2310,7 +2310,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__':