Uh oh!
There was an error while loading. Please reload this page.
gh-93096: fix test_mimetypes.test_guess_type_conflicting_with_mimetypes - #131408
Conversation
Using `run_python_until_end()` ignores `setUpModule()`. In particular, mocking `mimetypes.knownfiles` has no effect for the CLI tests and leads to issues on platforms defining non-standard MIME types such as macOS or openSUSE.
picnixz
commented
Mar 18, 2025
!buildbot macOS |
bedevere-bot
commented
Mar 18, 2025
🤖 New build scheduled with the buildbot fleet by @picnixz for commit 62863a0 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F131408%2Fmerge The command will test the builders whose names match following regular expression: The builders matched are:
|
picnixz
commented
Mar 18, 2025
!buildbot macOS |
bedevere-bot
commented
Mar 18, 2025
🤖 New build scheduled with the buildbot fleet by @picnixz for commit 7be23f0 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F131408%2Fmerge The command will test the builders whose names match following regular expression: The builders matched are:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
picnixz
commented
Apr 7, 2025
@hugovk friendly ping (I hope we can ship it before the release as it could affect openSUSE users) |
AA-Turner
left a comment
There was a problem hiding this comment.
An alternative solution to sys.exit() with a string or the esoteric parser.exit() would just be to directly raise SystemExit, would this work?:
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
picnixz
commented
Apr 8, 2025
Mmh the CI seems to hang? |
…cnixz/cpython into fix/test/conflicting-mime-types-93096
picnixz
commented
Apr 8, 2025
Ah I wanted to write the commit message :') but you beat me to it |
picnixz
commented
Apr 8, 2025
Hum: This is on iOS ARM64. Let's just skip this one on this maybe. |
Using
run_python_until_end()ignoressetUpModule(). In particular, mockingmimetypes.knownfileshas no effect for the CLI tests and leads to issues on platforms defining non-standard MIME types such as macOS or openSUSE.I think this was overlooked in #93097 and this may be the reason why finding the correct extension was tedious. Now, all platforms should support the test correctly (previously, the macOS files were still looked up as
mimetypes.knownfileswas not unset for CLI tests).