group test cases

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
This commit is contained in:
nulano 2020-08-21 13:05:36 +01:00
parent 76a51270fa
commit 4b2a0173d3

View File

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