diff --git a/Tests/test_image_fromqimage.py b/Tests/test_image_fromqimage.py index c20123a1bbf..1149e29649e 100644 --- a/Tests/test_image_fromqimage.py +++ b/Tests/test_image_fromqimage.py @@ -16,11 +16,13 @@ not ImageQt.qt_is_installed, reason="Qt bindings are not installed" ) -ims = [ - hopper(), - Image.open("Tests/images/transparent.png"), - Image.open("Tests/images/7x13.png"), -] +ims: list[Image.Image] = [] + + +def setup_module() -> None: + ims.append(hopper()) + ims.append(Image.open("Tests/images/transparent.png")) + ims.append(Image.open("Tests/images/7x13.png")) def teardown_module() -> None: