Fix ResourceWarning: unclosed file

This commit is contained in:
Hugo van Kemenade 2021-08-24 10:58:02 +03:00
parent fb0aad5abd
commit 2b9e230f76

View File

@ -16,7 +16,7 @@ def test_sanity():
def test_reload(): def test_reload():
im = Image.open("Tests/images/hopper.gif") with Image.open("Tests/images/hopper.gif") as im:
original = im.copy() original = im.copy()
im.palette.dirty = 1 im.palette.dirty = 1
assert_image_equal(im.convert("RGB"), original.convert("RGB")) assert_image_equal(im.convert("RGB"), original.convert("RGB"))