diff --git a/Tests/test_image_access.py b/Tests/test_image_access.py index a4050b4d83d..6b1eb48518d 100644 --- a/Tests/test_image_access.py +++ b/Tests/test_image_access.py @@ -330,7 +330,9 @@ def test_p_putpixel_rgb_rgba(self): class TestImagePutPixelError(AccessTest): IMAGE_MODES1 = ["L", "LA", "RGB", "RGBA"] + IMAGE_MODES2 = ["I", "I;16", "BGR;15"] INVALID_TYPES1 = ["foo", 1.0, None] + INVALID_TYPES2 = [*INVALID_TYPES1, (10,)] @pytest.mark.parametrize("mode", IMAGE_MODES1) def test_putpixel_type_error1(self, mode): @@ -339,9 +341,6 @@ def test_putpixel_type_error1(self, mode): with pytest.raises(TypeError, match="color must be int or tuple"): im.putpixel((0, 0), v) - IMAGE_MODES2 = ["I", "I;16", "BGR;15"] - INVALID_TYPES2 = [*INVALID_TYPES1, (10,)] - @pytest.mark.parametrize("mode", IMAGE_MODES2) def test_putpixel_type_error2(self, mode): im = hopper(mode)