Skip to content

Commit edf95da

Browse files
committed
gh-131178: fix test_unknown_flag to supply positional arg
1 parent f6db7b1 commit edf95da

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/test/test_mimetypes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,9 +557,9 @@ def test_multiple_inputs_with_error(self):
557557
self.assertEqual(stderr, b'')
558558

559559
def test_unknown_flag(self):
560-
rc, stdout, stderr = assert_python_failure('-m', 'mimetypes', '--unknown-flag')
560+
rc, stdout, stderr = assert_python_failure('-m', 'mimetypes', '--unknown-flag', 'foo.pdf')
561561
self.assertEqual(stdout, b'')
562-
self.assertIn(b'error', stderr)
562+
self.assertIn(b'error: unrecognized arguments: --unknown-flag', stderr)
563563

564564

565565
if __name__ == "__main__":

0 commit comments

Comments
 (0)