Skip to content

gh-93096: fix test_mimetypes.test_invocation_error tests on iOS ARM64 #132266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 8, 2025

Conversation

picnixz
Copy link
Member

@picnixz picnixz commented Apr 8, 2025

@picnixz picnixz requested a review from a team as a code owner April 8, 2025 11:57
@bedevere-app bedevere-app bot added awaiting core review tests Tests in the Lib/test dir labels Apr 8, 2025
@picnixz

This comment was marked as resolved.

@bedevere-bot

This comment was marked as resolved.

@picnixz

This comment was marked as resolved.

@bedevere-bot

This comment was marked as resolved.

@picnixz picnixz requested a review from hugovk April 8, 2025 11:58
@picnixz
Copy link
Member Author

picnixz commented Apr 8, 2025

On iOS, mocking didn't seem to work correctly (and I don't know why) so we'll just make something even more unknown. If bar_ext is a registered extension, then I think the system is really weird.

@picnixz
Copy link
Member Author

picnixz commented Apr 8, 2025

And I forgot to print the help correctly...

@picnixz

This comment was marked as resolved.

@bedevere-bot

This comment was marked as resolved.

@picnixz
Copy link
Member Author

picnixz commented Apr 8, 2025

Hum. Interestingly, on main python -m mimetypes actually exits before printing the help. So technically... it's not even needed:

$ python -m mimetypes
usage: python -m mimetypes [-h] [-e] [-l] type [type ...]
python -m mimetypes: error: the following arguments are required: type

The (incorrect) return parser.format_help() is not even reached because _parse_args() is already raising SystemExit (this is because the argument is required!)

@picnixz
Copy link
Member Author

picnixz commented Apr 8, 2025

Great, the test suite now passes on iOS (still running):

0:08:04 load avg: 31.35 [278/486] test_mimetypes
0:08:04 load avg: 44.62 [278/486] test_mimetypes passed

@picnixz

This comment was marked as resolved.

@bedevere-bot

This comment was marked as resolved.

@picnixz picnixz merged commit f5a7037 into python:main Apr 8, 2025
42 of 44 checks passed
@picnixz picnixz deleted the fix/tests/mimetypes-ios-arm-93096 branch April 8, 2025 13:03
seehwan pushed a commit to seehwan/cpython that referenced this pull request Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants