mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-21 12:44:46 +03:00
Use context manager
This commit is contained in:
parent
be24990535
commit
8bfd763f33
|
@ -332,9 +332,8 @@ def test_dispose_background():
|
|||
|
||||
|
||||
def test_transparent_dispose():
|
||||
img = Image.open("Tests/images/transparent_dispose.gif")
|
||||
|
||||
expected_colors = [(2, 1, 2), (0, 1, 0), (2, 1, 2)]
|
||||
with Image.open("Tests/images/transparent_dispose.gif") as img:
|
||||
for frame in range(3):
|
||||
img.seek(frame)
|
||||
for x in range(3):
|
||||
|
|
Loading…
Reference in New Issue
Block a user