Skip to content

Commit 8b5d191

Browse files
bpo-33967: Fix wrong use of assertRaises (GH-8306)
(cherry picked from commit 56d8f57) Co-authored-by: INADA Naoki <[email protected]>
1 parent f1ab9ca commit 8b5d191

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_functools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2083,7 +2083,7 @@ def test_invalid_positional_argument(self):
20832083
def f(*args):
20842084
pass
20852085
msg = 'f requires at least 1 positional argument'
2086-
with self.assertRaises(TypeError, msg=msg):
2086+
with self.assertRaisesRegex(TypeError, msg):
20872087
f()
20882088

20892089
if __name__ == '__main__':

0 commit comments

Comments
 (0)