summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-06-06 01:59:19 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-06-06 01:59:19 (GMT)
commitf8f3121775520b6d731924d2e0ce86d2cea898fa (patch)
tree06bdbacd205e26a81a4236cc2511d30c55a0470c /Lib
parented84ab333501cb79642c1a3c0763573fc3eb6a1d (diff)
downloadcpython-f8f3121775520b6d731924d2e0ce86d2cea898fa.zip
cpython-f8f3121775520b6d731924d2e0ce86d2cea898fa.tar.gz
cpython-f8f3121775520b6d731924d2e0ce86d2cea898fa.tar.bz2
Issue #27108: Add missing names to mimetypes.__all__, by Jacek KoƂodziej
Diffstat (limited to 'Lib')
-rw-r--r--Lib/mimetypes.py6
-rw-r--r--Lib/test/test_mimetypes.py6
2 files changed, 10 insertions, 2 deletions
diff --git a/Lib/mimetypes.py b/Lib/mimetypes.py
index 0be76ad..9a88680 100644
--- a/Lib/mimetypes.py
+++ b/Lib/mimetypes.py
@@ -33,8 +33,10 @@ except ImportError:
_winreg = None
__all__ = [
- "guess_type","guess_extension","guess_all_extensions",
- "add_type","read_mime_types","init"
+ "knownfiles", "inited", "MimeTypes",
+ "guess_type", "guess_all_extensions", "guess_extension",
+ "add_type", "init", "read_mime_types",
+ "suffix_map", "encodings_map", "types_map", "common_types"
]
knownfiles = [
diff --git a/Lib/test/test_mimetypes.py b/Lib/test/test_mimetypes.py
index 6856593..4e2c908 100644
--- a/Lib/test/test_mimetypes.py
+++ b/Lib/test/test_mimetypes.py
@@ -101,5 +101,11 @@ class Win32MimeTypesTestCase(unittest.TestCase):
eq(self.db.guess_type("image.jpg"), ("image/jpeg", None))
eq(self.db.guess_type("image.png"), ("image/png", None))
+
+class MiscTestCase(unittest.TestCase):
+ def test__all__(self):
+ support.check__all__(self, mimetypes)
+
+
if __name__ == "__main__":
unittest.main()