summary refs log tree commit diff stats
path: root/tests/functional/m68k/test_nextcube.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/m68k/test_nextcube.py')
-rwxr-xr-xtests/functional/m68k/test_nextcube.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/functional/m68k/test_nextcube.py b/tests/functional/m68k/test_nextcube.py
index 13c72bd136..c1610e5845 100755
--- a/tests/functional/m68k/test_nextcube.py
+++ b/tests/functional/m68k/test_nextcube.py
@@ -44,7 +44,8 @@ class NextCubeMachine(QemuSystemTest):
         self.check_bootrom_framebuffer(screenshot_path)
 
         from PIL import Image
-        width, height = Image.open(screenshot_path).size
+        with Image.open(screenshot_path) as image:
+                width, height = image.size
         self.assertEqual(width, 1120)
         self.assertEqual(height, 832)