Skip to content

[3.15] gh-93417: Improve test_mimetypes (GH-150725) - #153748

Merged
serhiy-storchaka merged 1 commit into
python:3.15from
serhiy-storchaka:backport-150725-3.15
Jul 15, 2026
Merged

serhiy-storchaka merged 1 commit into
python:3.15from
serhiy-storchaka:backport-150725-3.15

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jul 15, 2026 •

Copy link
Copy Markdown
Member

gh-93417: Improve test_mimetypes (GH-150725)

  • Separate tests for module-level API and for the MimeTypes class.
  • Add tests for mimetypes.init() and MimeTypes() with knownfiles and with
    explicitly passed files.

(cherry picked from commit b23646a)

Manually resolved a conflict: on 3.15 undotted extensions in add_type() are still deprecated (DeprecationWarning), not rejected with ValueError, so the relocated test_add_type_with_undotted_extension_* test keeps the 3.15 deprecation semantics.

* Separate tests for module-level API and for the MimeTypes class.
* Add tests for mimetypes.init() and MimeTypes() with knownfiles and with
  explicitly passed files.

(cherry picked from commit b23646a)
@serhiy-storchaka
serhiy-storchaka requested a review from a team as a code owner July 15, 2026 08:32
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) July 15, 2026 08:49
@serhiy-storchaka
serhiy-storchaka merged commit 22eff88 into python:3.15 Jul 15, 2026
89 of 91 checks passed
@serhiy-storchaka
serhiy-storchaka deleted the backport-150725-3.15 branch July 15, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

1 participant