From 11948050ae55febce4d65006c6eb5f01add4d804 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sun, 20 Feb 2022 23:54:12 +1100 Subject: [PATCH] Updated tests in light of #6060 --- Tests/test_image_getpalette.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Tests/test_image_getpalette.py b/Tests/test_image_getpalette.py index 1a84b6928..58a6dacbb 100644 --- a/Tests/test_image_getpalette.py +++ b/Tests/test_image_getpalette.py @@ -27,22 +27,18 @@ def test_palette_rawmode(): for rawmode in ("RGB", None): rgb = im.getpalette(rawmode) - assert len(rgb) == 256 * 3 - assert rgb[:3] == [1, 2, 3] + assert rgb == [1, 2, 3] # Convert the RGB palette to RGBA rgba = im.getpalette("RGBA") - assert len(rgba) == 256 * 4 - assert rgba[:4] == [1, 2, 3, 255] + assert rgba == [1, 2, 3, 255] im.putpalette((1, 2, 3, 4), "RGBA") # Convert the RGBA palette to RGB rgb = im.getpalette("RGB") - assert len(rgb) == 256 * 3 - assert rgb[:3] == [1, 2, 3] + assert rgb == [1, 2, 3] for rawmode in ("RGBA", None): rgba = im.getpalette(rawmode) - assert len(rgba) == 256 * 4 - assert rgba[:4] == [1, 2, 3, 4] + assert rgba == [1, 2, 3, 4]