Update Tests/check_avif_leaks.py

Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
Frankie Dintino 2024-10-18 09:33:55 -04:00 committed by GitHub
parent e5494a2ce8
commit 8b8bbba0f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -36,9 +36,8 @@ def test_leak_save() -> None:
setrlimit(RLIMIT_STACK, (stack_size, stack_size))
setrlimit(RLIMIT_AS, (mem_limit, mem_limit))
for _ in range(iterations):
test_output = BytesIO()
with Image.open(test_file) as im:
im.load()
test_output = BytesIO()
im.save(test_output, "AVIF")
test_output.seek(0)
test_output.read()
test_output.seek(0)
test_output.read()