mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 18:26:17 +03:00
Fix ResourceWarning: unclosed file
This commit is contained in:
parent
fb0aad5abd
commit
2b9e230f76
|
@ -16,10 +16,10 @@ def test_sanity():
|
|||
|
||||
|
||||
def test_reload():
|
||||
im = Image.open("Tests/images/hopper.gif")
|
||||
original = im.copy()
|
||||
im.palette.dirty = 1
|
||||
assert_image_equal(im.convert("RGB"), original.convert("RGB"))
|
||||
with Image.open("Tests/images/hopper.gif") as im:
|
||||
original = im.copy()
|
||||
im.palette.dirty = 1
|
||||
assert_image_equal(im.convert("RGB"), original.convert("RGB"))
|
||||
|
||||
|
||||
def test_getcolor():
|
||||
|
|
Loading…
Reference in New Issue
Block a user