From a357ff12ad38f23190dfcf632fcbd6abd3065bc3 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Wed, 4 Nov 2020 22:39:25 +1100 Subject: [PATCH] Simplified test --- Tests/test_file_ico.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Tests/test_file_ico.py b/Tests/test_file_ico.py index ba9f84f5e..a5f728c42 100644 --- a/Tests/test_file_ico.py +++ b/Tests/test_file_ico.py @@ -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)