From 25ff80388c3194a2cf71986cba1d8ea4094cfbe0 Mon Sep 17 00:00:00 2001 From: Zackery Spytz Date: Wed, 11 Jul 2018 20:06:07 -0600 Subject: [PATCH 1/3] bpo-33967: Fix use of deprecated assertRaisesRegexp() in test_functools It was added in 445f1b3. --- 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 f9f96bac6d4ed2..10bf0a2aa89542 100644 --- a/Lib/test/test_functools.py +++ b/Lib/test/test_functools.py @@ -2310,7 +2310,7 @@ def test_invalid_positional_argument(self): def f(*args): pass msg = 'f requires at least 1 positional argument' - with self.assertRaisesRegexp(TypeError, msg): + with self.assertRaisesRegex(TypeError, msg): f() if __name__ == '__main__': From 37071b61cb19d2272644373468252abe796eda58 Mon Sep 17 00:00:00 2001 From: INADA Naoki Date: Thu, 12 Jul 2018 11:50:59 +0900 Subject: [PATCH 2/3] Update test_functools.py --- 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 10bf0a2aa89542..7e1e4cd0467571 100644 --- a/Lib/test/test_functools.py +++ b/Lib/test/test_functools.py @@ -2310,7 +2310,7 @@ def test_invalid_positional_argument(self): def f(*args): pass msg = 'f requires at least 1 positional argument' - with self.assertRaisesRegex(TypeError, msg): + with self.assertRaises(TypeError, msg): f() if __name__ == '__main__': From 29fb9a2e133e2e8be142f68f2d9e20df69c2548d Mon Sep 17 00:00:00 2001 From: Zackery Spytz Date: Wed, 11 Jul 2018 21:24:56 -0600 Subject: [PATCH 3/3] Update test_functools.py --- 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 7e1e4cd0467571..63149d54082a78 100644 --- a/Lib/test/test_functools.py +++ b/Lib/test/test_functools.py @@ -2310,7 +2310,7 @@ def test_invalid_positional_argument(self): def f(*args): pass msg = 'f requires at least 1 positional argument' - with self.assertRaises(TypeError, msg): + with self.assertRaises(TypeError, msg=msg): f() if __name__ == '__main__':