[Python-checkins] bpo-33967: Remove use of deprecated assertRaisesRegexp() (GH-8261) (GH-8295)

Victor Stinner webhook-mailer at python.org
Mon Jul 16 05:26:53 EDT 2018


https://github.com/python/cpython/commit/336c9539a90e0f5df5bcc5b444b8400a58820583
commit: 336c9539a90e0f5df5bcc5b444b8400a58820583
branch: 3.6
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Victor Stinner <vstinner at redhat.com>
date: 2018-07-16T11:26:49+02:00
summary:

bpo-33967: Remove use of deprecated assertRaisesRegexp() (GH-8261) (GH-8295)

It was added in test_functools at 445f1b3.
(cherry picked from commit 9e9b2c32a34594e901b5b9a03c561a2a2bf63ece)

Co-authored-by: Zackery Spytz <zspytz at gmail.com>

files:
M Lib/test/test_functools.py

diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py
index 5e454dd9abc2..86ed9d52e1b4 100644
--- a/Lib/test/test_functools.py
+++ b/Lib/test/test_functools.py
@@ -2083,7 +2083,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.assertRaises(TypeError, msg=msg):
             f()
 
 if __name__ == '__main__':



More information about the Python-checkins mailing list