Skip to content

Commit

Permalink
static
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Oct 7, 2023
1 parent 801d5a1 commit a84dd6a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Tests/test_lib_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
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"\xa4\xf6\x1a\xd4\xee\x15[EI\xf1\xfb^"#secrets.token_bytes(num_img_bytes)
print("input", data)
img_a = Image.frombytes(mode, (2, 2), data)
img_b = Image.frombytes(mode, (2, 2), data)
assert img_a.tobytes() == img_b.tobytes()
print("tobytes", img_a.tobytes(), img_b.tobytes())
assert img_a.im == img_b.im

0 comments on commit a84dd6a

Please sign in to comment.