From 8b8bbba0f77c4ed5d1479d3f6e0c1b79dfb4f867 Mon Sep 17 00:00:00 2001 From: Frankie Dintino Date: Fri, 18 Oct 2024 09:33:55 -0400 Subject: [PATCH] Update Tests/check_avif_leaks.py Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com> --- Tests/check_avif_leaks.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Tests/check_avif_leaks.py b/Tests/check_avif_leaks.py index e59c4fd8c55..343349dd6a1 100644 --- a/Tests/check_avif_leaks.py +++ b/Tests/check_avif_leaks.py @@ -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()