mirror of
https://github.com/python/cpython.git
synced 2026-04-22 03:41:08 +00:00
bpo-33967: Fix wrong use of assertRaises (GH-8306)
(cherry picked from commit 56d8f57b83)
Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
This commit is contained in:
parent
bfa8a358e2
commit
892df9d15a
1 changed files with 1 additions and 1 deletions
|
|
@ -2192,7 +2192,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__':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue