Added test

This commit is contained in:
Andrew Murray 2017-09-04 20:32:15 +10:00
parent 567351f632
commit 55d0a816c7

View File

@ -459,6 +459,22 @@ class TestImage(PillowTestCase):
target = Image.open(target_file).convert(mode)
self.assert_image_equal(im, target)
def test_register_extensions(self):
test_format = "a"
exts = ["b", "c"]
for ext in exts:
Image.register_extension(test_format, ext)
ext_individual = Image.EXTENSION.copy()
for ext in exts:
del Image.EXTENSION[ext]
Image.register_extensions(test_format, exts)
ext_multiple = Image.EXTENSION.copy()
for ext in exts:
del Image.EXTENSION[ext]
self.assertEqual(ext_individual, ext_multiple)
def test_remap_palette(self):
# Test illegal image mode
im = hopper()