Skip to content

Commit

Permalink
group test cases
Browse files Browse the repository at this point in the history
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
  • Loading branch information
nulano and hugovk committed Aug 21, 2020
1 parent 76a5127 commit 8a619b2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Tests/test_image_access.py
Expand Up @@ -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):
Expand All @@ -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)
Expand Down

0 comments on commit 8a619b2

Please sign in to comment.