diff --git a/Tests/test_lib_image.py b/Tests/test_lib_image.py index 7d77f096393..88b195fd960 100644 --- a/Tests/test_lib_image.py +++ b/Tests/test_lib_image.py @@ -26,11 +26,11 @@ "BGR;24", ) + @pytest.mark.parametrize("mode", mode_names) def test_equal(mode): num_img_bytes = len(Image.new(mode, (2, 2)).tobytes()) - # alternatively, random.randbytes() in Python 3.9 - data = secrets.token_bytes(num_img_bytes) + data = b"0\xd2\xf9\x92Db\xbd]\x84\x86fd%\xfeR\x1b" img_a = Image.frombytes(mode, (2, 2), data) img_b = Image.frombytes(mode, (2, 2), data) assert img_a.tobytes() == img_b.tobytes()