Skip to content

Commit 5eee081

Browse files
committed
autosize TestImageBytes.sample_bytes
1 parent 6a1b899 commit 5eee081

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Tests/test_image.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,8 +1047,11 @@ class TestImageBytes:
10471047
name for name, num_bands, pixelsize in image_modes if "BGR" not in name
10481048
]
10491049

1050-
# make this bigger if necessary
1051-
sample_bytes = bytes(range(16))
1050+
sample_bytes = bytes(
1051+
range(
1052+
2 * 2 * max(pixelsize for mode, num_bands, pixelsize in image_modes_not_bgr)
1053+
)
1054+
)
10521055

10531056
@pytest.mark.parametrize("mode", image_mode_names_not_bgr)
10541057
def test_roundtrip_bytes_constructor(self, mode):

0 commit comments

Comments
 (0)