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]