Skip to content

Commit

Permalink
autosize TestImageBytes.sample_bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
Yay295 committed Mar 11, 2024
1 parent 43f3c82 commit 79c9b2b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Tests/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -1051,8 +1051,11 @@ class TestImageBytes:
name for name, num_bands, pixelsize in image_modes if "BGR" not in name
]

# make this bigger if necessary
sample_bytes = bytes(range(16))
sample_bytes = bytes(
range(
2 * 2 * max(pixelsize for mode, num_bands, pixelsize in image_modes_not_bgr)
)
)

@pytest.mark.parametrize("mode", image_mode_names_not_bgr)
def test_roundtrip_bytes_constructor(self, mode):
Expand Down

0 comments on commit 79c9b2b

Please sign in to comment.