Skip to content

Commit

Permalink
Fix test func.
Browse files Browse the repository at this point in the history
  • Loading branch information
lajiyuan committed Jan 12, 2024
1 parent d7120dd commit 8326ec5
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/end_trunc_file.png")
finally:
ImageFile.LOAD_TRUNCATED_IMAGES = False

Expand Down

0 comments on commit 8326ec5

Please sign in to comment.