We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84042da commit c81b295Copy full SHA for c81b295
Tests/test_file_avif.py
@@ -157,8 +157,10 @@ def test_no_resource_warning(self, tmp_path):
157
158
def test_file_pointer_could_be_reused(self):
159
with open(TEST_AVIF_FILE, "rb") as blob:
160
- Image.open(blob).load()
161
+ with Image.open(blob) as im:
+ im.load()
162
163
164
165
def test_background_from_gif(self, tmp_path):
166
with Image.open("Tests/images/chi.gif") as im:
@@ -170,7 +172,8 @@ def test_background_from_gif(self, tmp_path):
170
172
171
173
# Save as GIF
174
out_gif = str(tmp_path / "temp.gif")
- Image.open(out_avif).save(out_gif)
175
+ with Image.open(out_avif) as im:
176
+ im.save(out_gif)
177
178
with Image.open(out_gif) as reread:
179
reread_value = reread.convert("RGB").getpixel((1, 1))
0 commit comments