mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Added mime type tests
This commit is contained in:
parent
a62c825922
commit
8f34621c14
|
@ -14,6 +14,7 @@ class TestFileIco(PillowTestCase):
|
|||
self.assertEqual(im.mode, "RGBA")
|
||||
self.assertEqual(im.size, (16, 16))
|
||||
self.assertEqual(im.format, "ICO")
|
||||
self.assertEqual(im.get_format_mimetype(), "image/x-icon")
|
||||
|
||||
def test_invalid_file(self):
|
||||
with open("Tests/images/flower.jpg", "rb") as fp:
|
||||
|
|
|
@ -13,6 +13,7 @@ class TestFilePcx(PillowTestCase):
|
|||
self.assertEqual(im2.mode, im.mode)
|
||||
self.assertEqual(im2.size, im.size)
|
||||
self.assertEqual(im2.format, "PCX")
|
||||
self.assertEqual(im2.get_format_mimetype(), "image/x-pcx")
|
||||
self.assert_image_equal(im2, im)
|
||||
|
||||
def test_sanity(self):
|
||||
|
|
|
@ -37,6 +37,8 @@ class TestFileTga(PillowTestCase):
|
|||
path_no_ext, origin, "rle" if rle else "raw")
|
||||
|
||||
original_im = Image.open(tga_path)
|
||||
self.assertEqual(original_im.format, "TGA")
|
||||
self.assertEqual(original_im.get_format_mimetype(), "image/x-tga")
|
||||
if rle:
|
||||
self.assertEqual(
|
||||
original_im.info["compression"], "tga_rle")
|
||||
|
|
Loading…
Reference in New Issue
Block a user