autosize TestImageBytes.sample_bytes

This commit is contained in:
Yay295 2023-06-10 21:23:46 -05:00
parent 43f3c822a7
commit 79c9b2b261

View File

@ -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):