mirror of
https://github.com/python/cpython.git
synced 2025-12-11 03:20:01 +00:00
gh-97901 add missing text/rtf to mimetypes (GH-97902)
Co-authored-by: Noam Cohen <noam@noam.me>
This commit is contained in:
parent
4ec347760f
commit
70969d53a7
3 changed files with 3 additions and 0 deletions
|
|
@ -561,6 +561,7 @@ def _default_mime_types():
|
||||||
'.pl' : 'text/plain',
|
'.pl' : 'text/plain',
|
||||||
'.srt' : 'text/plain',
|
'.srt' : 'text/plain',
|
||||||
'.rtx' : 'text/richtext',
|
'.rtx' : 'text/richtext',
|
||||||
|
'.rtf' : 'text/rtf',
|
||||||
'.tsv' : 'text/tab-separated-values',
|
'.tsv' : 'text/tab-separated-values',
|
||||||
'.vtt' : 'text/vtt',
|
'.vtt' : 'text/vtt',
|
||||||
'.py' : 'text/x-python',
|
'.py' : 'text/x-python',
|
||||||
|
|
|
||||||
|
|
@ -213,6 +213,7 @@ class MimeTypesTestCase(unittest.TestCase):
|
||||||
self.assertEqual(mimetypes.guess_extension('message/rfc822'), '.eml')
|
self.assertEqual(mimetypes.guess_extension('message/rfc822'), '.eml')
|
||||||
self.assertEqual(mimetypes.guess_extension('text/html'), '.html')
|
self.assertEqual(mimetypes.guess_extension('text/html'), '.html')
|
||||||
self.assertEqual(mimetypes.guess_extension('text/plain'), '.txt')
|
self.assertEqual(mimetypes.guess_extension('text/plain'), '.txt')
|
||||||
|
self.assertEqual(mimetypes.guess_extension('text/rtf'), '.rtf')
|
||||||
self.assertEqual(mimetypes.guess_extension('video/mpeg'), '.mpeg')
|
self.assertEqual(mimetypes.guess_extension('video/mpeg'), '.mpeg')
|
||||||
self.assertEqual(mimetypes.guess_extension('video/quicktime'), '.mov')
|
self.assertEqual(mimetypes.guess_extension('video/quicktime'), '.mov')
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
Mime type ``text/rtf`` is now supported by :mod:`mimetypes`.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue