mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Tests for #544
This commit is contained in:
parent
86ab020736
commit
9518214980
|
@ -46,5 +46,13 @@ def test_16bit_workaround():
|
|||
im = Image.open('Tests/images/16bit.cropped.tif')
|
||||
_test_float_conversion(im.convert('I'))
|
||||
|
||||
def test_rgba_p():
|
||||
im = lena('RGBA')
|
||||
im.putalpha(lena('L'))
|
||||
|
||||
converted = im.convert('P')
|
||||
comparable = converted.convert('RGBA')
|
||||
|
||||
assert_image_similar(im, comparable, 20)
|
||||
|
||||
|
||||
|
|
|
@ -19,4 +19,9 @@ def test_octree_quantize():
|
|||
im = im.quantize(100, Image.FASTOCTREE)
|
||||
assert_image(im, "P", im.size)
|
||||
|
||||
assert len(im.getcolors()) == 100
|
||||
assert len(im.getcolors()) == 100
|
||||
|
||||
def test_rgba_quantize():
|
||||
im = lena('RGBA')
|
||||
assert_no_exception(lambda: im.quantize())
|
||||
assert_exception(Exception, lambda: im.quantize(method=0))
|
||||
|
|
Loading…
Reference in New Issue
Block a user