Skip to content

[3.13] gh-93417: Improve test_mimetypes (GH-150725)#153750

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

[3.13] gh-93417: Improve test_mimetypes (GH-150725)#153750
serhiy-storchaka merged 1 commit into
python:3.13from
serhiy-storchaka:backport-150725-3.13

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)

The reorganized tests were reconciled with 3.13 content. In particular, the test for undotted extensions in add_type() was omitted because 3.13 accepts them silently (the deprecation/rejection was introduced in later versions), and the moved tests keep 3.13's image/jpg expectations.

* 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:45
@serhiy-storchaka serhiy-storchaka enabled auto-merge (squash) July 15, 2026 08:48
@serhiy-storchaka serhiy-storchaka merged commit 824df7f into python:3.13 Jul 15, 2026
41 checks passed
@serhiy-storchaka serhiy-storchaka deleted the backport-150725-3.13 branch July 15, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant