mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 18:06:18 +03:00
Simplified test
This commit is contained in:
parent
4ca8a3507d
commit
a357ff12ad
|
@ -87,19 +87,15 @@ def test_only_save_relevant_sizes(tmp_path):
|
|||
|
||||
def test_only_save_append_images(tmp_path):
|
||||
"""append_images should work to provide alternative sizes"""
|
||||
im = hopper()
|
||||
provided_im = Image.new("RGBA", (32, 32), (255, 0, 0, 255))
|
||||
im = hopper("RGBA")
|
||||
provided_im = Image.new("RGBA", (32, 32), (255, 0, 0))
|
||||
outfile = str(tmp_path / "temp_saved_multi_icon.ico")
|
||||
im.save(outfile, sizes=[(32, 32), (64, 64)], append_images=[provided_im])
|
||||
im.save(outfile, sizes=[(32, 32), (128, 128)], append_images=[provided_im])
|
||||
|
||||
with Image.open(outfile) as reread:
|
||||
reread.size = (64, 64)
|
||||
reread.load()
|
||||
assert_image_equal(reread, hopper().resize((64, 64), Image.LANCZOS))
|
||||
assert_image_equal(reread, hopper("RGBA"))
|
||||
|
||||
with Image.open(outfile) as reread:
|
||||
reread.size = (32, 32)
|
||||
reread.load()
|
||||
assert_image_equal(reread, provided_im)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user