Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix mimetypes tests on iOS ARM64
  • Loading branch information
picnixz committed Apr 8, 2025
commit 926cbe23973b332718aedb119c08d8e248014729
9 changes: 4 additions & 5 deletions Lib/test/test_mimetypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,6 @@ def test_parse_args(self):
self.assertFalse(args.lenient)
self.assertEqual(args.type, ["foo.pic"])


def test_invocation(self):
for command, expected in [
("-l -e image/jpg", ".jpg"),
Expand All @@ -426,14 +425,14 @@ def test_invocation(self):
]:
self.assertEqual(mimetypes._main(shlex.split(command)), expected)


def test_invocation_error(self):
for command, expected in [
("-e image/jpg", "error: unknown type image/jpg"),
("foo.pic", "error: media type unknown for foo.pic"),
("foo.bar_ext", "error: media type unknown for foo.bar_ext"),
]:
with self.assertRaisesRegex(SystemExit, expected):
mimetypes._main(shlex.split(command))
with self.subTest(command=command):
with self.assertRaisesRegex(SystemExit, expected):
mimetypes._main(shlex.split(command))


if __name__ == "__main__":
Expand Down
Loading