Skip to content

Commit 56d8f57

Browse files
authored
bpo-33967: Fix wrong use of assertRaises (GH-8306)
1 parent 01b7d58 commit 56d8f57

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
@@ -2310,7 +2310,7 @@ def test_invalid_positional_argument(self):
23102310
def f(*args):
23112311
pass
23122312
msg = 'f requires at least 1 positional argument'
2313-
with self.assertRaises(TypeError, msg=msg):
2313+
with self.assertRaisesRegex(TypeError, msg):
23142314
f()
23152315

23162316
if __name__ == '__main__':

0 commit comments

Comments
 (0)