From 4b2a0173d39a4e982c88fc1a43e5961260ff7731 Mon Sep 17 00:00:00 2001 From: nulano Date: Fri, 21 Aug 2020 13:05:36 +0100 Subject: [PATCH] group test cases Co-authored-by: Hugo van Kemenade --- Tests/test_image_access.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Tests/test_image_access.py b/Tests/test_image_access.py index a4050b4d83d..6d336fb3ce9 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)