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 <3112309+radarhere@users.noreply.github.com>
  • Loading branch information
lajiyuan and radarhere committed 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
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.