Skip to content

Commit

Permalink
Merge pull request #7325 from Yay295/Yay295-patch-1
Browse files Browse the repository at this point in the history
Fix param in test_image.py function
  • Loading branch information
radarhere authored Aug 8, 2023
2 parents a5b0256 + 5b6b634 commit 241a012
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Tests/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,15 +661,15 @@ def test__new(self):
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)
Expand Down

0 comments on commit 241a012

Please sign in to comment.