[Python-checkins] bpo-33967: Fix wrong use of assertRaises (GH-8306)
Miss Islington (bot)
webhook-mailer at python.org
Tue Jul 17 01:38:32 EDT 2018
https://github.com/python/cpython/commit/8b5d191386350d28a0f20283dcb366cf50f82b97
commit: 8b5d191386350d28a0f20283dcb366cf50f82b97
branch: 3.6
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-07-16T22:38:28-07:00
summary:
bpo-33967: Fix wrong use of assertRaises (GH-8306)
(cherry picked from commit 56d8f57b83a37b05a6f2fbc3e141bbc1ba6cb3a2)
Co-authored-by: INADA Naoki <methane at users.noreply.github.com>
files:
M Lib/test/test_functools.py
diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py
index 86ed9d52e1b4..af02e8d1d546 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.assertRaises(TypeError, msg=msg):
+ with self.assertRaisesRegex(TypeError, msg):
f()
if __name__ == '__main__':
More information about the Python-checkins
mailing list