mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 09:56:17 +03:00
Merge pull request #7325 from Yay295/Yay295-patch-1
Fix param in test_image.py function
This commit is contained in:
commit
241a012804
|
@ -661,15 +661,15 @@ class TestImage:
|
|||
blank_p.palette = None
|
||||
blank_pa.palette = None
|
||||
|
||||
def _make_new(base_image, im, palette_result=None):
|
||||
new_im = base_image._new(im)
|
||||
assert new_im.mode == im.mode
|
||||
assert new_im.size == im.size
|
||||
assert new_im.info == base_image.info
|
||||
def _make_new(base_image, image, palette_result=None):
|
||||
new_image = base_image._new(image.im)
|
||||
assert new_image.mode == image.mode
|
||||
assert new_image.size == image.size
|
||||
assert new_image.info == base_image.info
|
||||
if palette_result is not None:
|
||||
assert new_im.palette.tobytes() == palette_result.tobytes()
|
||||
assert new_image.palette.tobytes() == palette_result.tobytes()
|
||||
else:
|
||||
assert new_im.palette is None
|
||||
assert new_image.palette is None
|
||||
|
||||
_make_new(im, im_p, ImagePalette.ImagePalette(list(range(256)) * 3))
|
||||
_make_new(im_p, im, None)
|
||||
|
|
Loading…
Reference in New Issue
Block a user