This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Improve test coverage for mimetypes module
Type: enhancement Stage: resolved
Components: Tests Versions: Python 3.9
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: miss-islington, xtreak
Priority: normal Keywords: patch

Created on 2020-01-11 06:06 by xtreak, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 17949 merged xtreak, 2020-01-11 06:07
PR 17991 closed miss-islington, 2020-01-13 18:25
PR 17992 merged miss-islington, 2020-01-13 18:25
Messages (4)
msg359781 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2020-01-11 06:06
Currently the test coverage for mimetypes module is at 57% . I propose adding the following tests to increase the coverage.

* Add test for case insensitive check of types and extensions.
* Add test for data url with no comma.
* Add test for read_mime_types function.
* Add tests for the mimetypes cli.
msg359810 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2020-01-11 17:00
With the proposed PR the coverage [0] stands at 80% with Windows tests for registry not covered as part of the coverage report. The tests also now use tearDownModule to restore the value of mimetypes.knownfiles which was being accidentally set empty for other tests too as part of the test setup and not restored properly.

msg359912 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2020-01-13 14:39
New changeset d8efc1495194228c3a4cd472200275d6491d8e2d by Karthikeyan Singaravelan in branch 'master':
bpo-39299: Add more tests for mimetypes and its cli. (GH-17949)
msg361820 - (view) Author: miss-islington (miss-islington) Date: 2020-02-11 15:32
New changeset d3f9fb2d28ceedb0a17a703338424ff284a578c8 by Miss Islington (bot) in branch '3.8':
bpo-39299: Add more tests for mimetypes and its cli. (GH-17949)
Date User Action Args
2022-04-11 14:59:25adminsetgithub: 83480
2020-02-11 15:34:33xtreaksetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-02-11 15:32:47miss-islingtonsetnosy: + miss-islington
messages: + msg361820
2020-01-13 18:25:28miss-islingtonsetpull_requests: + pull_request17395
2020-01-13 18:25:20miss-islingtonsetpull_requests: + pull_request17394
2020-01-13 14:39:43xtreaksetmessages: + msg359912
2020-01-11 17:00:33xtreaksetmessages: + msg359810
2020-01-11 06:07:16xtreaksetkeywords: + patch
stage: patch review
pull_requests: + pull_request17356
2020-01-11 06:06:36xtreakcreate