Skip to content

Commit

Permalink
Merge pull request #7911 from Yay295/fix_unclosed_images
Browse files Browse the repository at this point in the history
Use setup_module() to open images so they aren't opened if skipped
  • Loading branch information
hugovk committed Mar 28, 2024
2 parents 3f49b0c + 0d86da5 commit e3aeaa6
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Tests/test_image_fromqimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e3aeaa6

Please sign in to comment.