mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-11 00:32:27 +03:00
Fix ResourceWarning: unclosed file
This commit is contained in:
parent
fb0aad5abd
commit
2b9e230f76
|
@ -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"))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user