New submission from Norman Lorrain <[email protected]>:
On Windows 10 machine, unit tests show this error:
0:05:10 load avg: 3.24 [221/427/1] test_mimetypes failed
test test_mimetypes failed -- Traceback (most recent call last):
File "D:\github\cpython\lib\test\test_mimetypes.py", line 289, in
test_guess_type
eq(type_info, "I don't know anything about type foo.pic")
AssertionError: 'type: image/pict encoding: None' != "I don't know anything
about type foo.pic"
- type: image/pict encoding: None
+ I don't know anything about type foo.pic
The test is verifying that the code reports `image/pict` as a *non-standard*
MIME type:
def test_guess_type(self):
eq = self.assertEqual
type_info = self.mimetypes_cmd("-l", "foo.pic")
eq(type_info, "type: image/pict encoding: None")
type_info = self.mimetypes_cmd("foo.pic")
eq(type_info, "I don't know anything about type foo.pic")
Looking in my registry, I see the entry for `.pic`
[HKEY_CLASSES_ROOT\.pic]
@="QuickTime.pic"
"Content Type"="image/pict"
...etc
The module seems to report everything it finds in the registry as "strict"
----------
components: Library (Lib)
messages: 393826
nosy: Norman Lorrain
priority: normal
severity: normal
status: open
title: mimetypes - "strict" on Windows
type: behavior
versions: Python 3.11
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue44159>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com