qutebrowser/tests/unit
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
..
api mypy: use from-import for typing in remaining files 2020-10-31 22:52:00 +10:00
browser Improve download filenames for data: URLs 2021-01-05 11:19:01 +01:00
commands Use enum.auto() for most enum values 2020-10-26 15:50:54 +01:00
completion Merge remote-tracking branch 'origin/pr/5992' 2020-12-30 13:51:39 +01:00
components Rename adblock component to hostblock 2020-12-22 19:20:49 +01:00
config pylint: Make config check more intelligent 2021-01-02 14:14:43 +01:00
extensions Adjust copyrights for 2020 2020-01-04 18:21:17 +01:00
javascript load scripts from config directory 2020-11-29 17:12:45 -05:00
keyinput Revert "Work around PyQt 5.15.1 waitSignals issues" 2020-11-24 18:48:19 +01:00
mainwindow old qt: Remove unused imports 2020-11-04 18:30:04 +01:00
misc history: Remove old force_rebuild values 2021-01-02 17:09:44 +01:00
scripts importer: improve documentation and arguments 2020-12-11 13:22:15 +00:00
utils Add overrides for mimetype -> extension conversion 2021-01-05 11:19:15 +01:00
test_app.py Adjust copyrights for 2020 2020-01-04 18:21:17 +01:00
test_qutebrowser.py Fix lint 2020-06-11 17:23:59 +02:00