We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef5cf14 commit bac8d5dCopy full SHA for bac8d5d
Lib/test/test_mimetypes.py
@@ -317,12 +317,10 @@ def test_add_type_with_undotted_extension_raises_exception(self):
317
with self.assertRaises(ValueError):
318
mimetypes.add_type('testing/type', 'undotted')
319
320
- def test_add_type_with_empty_extension_emits_warning(self):
+ def test_add_type_with_empty_extension_emits_no_warning(self):
321
with warnings.catch_warnings(record=True) as wlog:
322
mimetypes.add_type('testing/type', '')
323
- self.assertEqual(len(wlog), 1)
324
- warning = wlog[0]
325
- self.assertEqual(str(warning.message), 'Empty extension specified')
+ self.assertEqual(len(wlog), 0)
326
327
328
@unittest.skipUnless(sys.platform.startswith("win"), "Windows only")
0 commit comments