Skip to content

Commit

Permalink
Update Tests/test_file_png.py
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Murray <[email protected]>
  • Loading branch information
lajiyuan and radarhere authored Jan 12, 2024
1 parent f0ef2df commit 6f2856d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Tests/test_file_png.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,9 +781,8 @@ class MyStdOut:
def test_end_truncated_filed(self):
ImageFile.LOAD_TRUNCATED_IMAGES = True
try:
img = Image.open("Tests/images/end_trunc_file.png")
img.load()
assert img is not None
with Image.open("Tests/images/end_trunc_file.png") as im:
assert_image_equal_tofile(im, "Tests/images/hopper.png")
finally:
ImageFile.LOAD_TRUNCATED_IMAGES = False

Expand Down

0 comments on commit 6f2856d

Please sign in to comment.