qutebrowser/tests
Florian Bruhin ebb3046822 Add overrides for mimetype -> extension conversion
Python 3.6 gets some of those "wrong":
https://bugs.python.org/issue1043134

This has been fixed in Python 3.7:
https://github.com/python/cpython/pull/14375

The override dict has been generated by copying the types_map from the
current git master:
https://github.com/python/cpython/blob/v3.10.0a3/Lib/mimetypes.py#L414-L547

And then running the following with Python 3.6:

    import mimetypes

    reverse = {}
    for ext, mimetype in types_map.items():
        if mimetype not in reverse:
            reverse[mimetype] = ext
    assert reverse['text/plain'] == '.txt'

    for mimetype, ext in reverse.items():
        got = mimetypes.guess_extension(mimetype)
        if got != ext:
            print(f'    "{mimetype}": "{ext}",  # not {got}')
2021-01-05 11:19:15 +01:00
..
end2end Improve download filenames for data: URLs 2021-01-05 11:19:01 +01:00
helpers tests: Make sure QWebEnginePage is deleted early 2021-01-04 19:45:22 +01:00
manual Rewrite file collection in misc_checks.py 2020-09-06 17:23:03 +02:00
unit Add overrides for mimetype -> extension conversion 2021-01-05 11:19:15 +01:00
conftest.py Use existing ON_CI constants 2020-12-04 19:04:52 +01:00
test_conftest.py Adjust copyrights for 2020 2020-01-04 18:21:17 +01:00