[Python-checkins] bpo-33967: Fix wrong use of assertRaises (GH-8306)
INADA Naoki
webhook-mailer at python.org
Tue Jul 17 00:44:51 EDT 2018
https://github.com/python/cpython/commit/56d8f57b83a37b05a6f2fbc3e141bbc1ba6cb3a2
commit: 56d8f57b83a37b05a6f2fbc3e141bbc1ba6cb3a2
branch: master
author: INADA Naoki <methane at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-07-17T13:44:47+09:00
summary:
bpo-33967: Fix wrong use of assertRaises (GH-8306)
files:
M Lib/test/test_functools.py
diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py
index 63149d54082a..10bf0a2aa895 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=msg):
+ with self.assertRaisesRegex(TypeError, msg):
f()
if __name__ == '__main__':
More information about the Python-checkins
mailing list