mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 01:34:24 +03:00
Added test
This commit is contained in:
parent
567351f632
commit
55d0a816c7
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user