Skip to content

Commit

Permalink
add some print statements to failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Yay295 committed Apr 16, 2024
1 parent fe33bc7 commit 1e9a829
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Tests/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -1038,10 +1038,15 @@ def test_roundtrip_bytes_method(self, mode: str) -> None:
def test_getdata_putdata(self, mode: str) -> None:
im = hopper(mode)

# copy the data from the previous image to a new image
# and check that they are the same
reloaded = Image.new(mode, im.size)
reloaded.putdata(im.getdata())

print('Mode: ' + mode)
print('Before: ' + bin(int.from_bytes(im.tobytes()[58:60], 'little')))
print('Before: ' + str(list(im.getdata())[29]))
print('After: ' + bin(int.from_bytes(reloaded.tobytes()[58:60], 'little')))
print('Before: ' + str(list(reloaded.getdata())[29]))

assert_image_equal(im, reloaded)


Expand Down

0 comments on commit 1e9a829

Please sign in to comment.