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 Feb 26, 2024
1 parent 6a1b899 commit 5eee081
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 @@ -1047,8 +1047,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 5eee081

Please sign in to comment.