Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use setup_module() to open images so they aren't opened if skipped #7911

Merged
merged 3 commits into from
Mar 28, 2024

Conversation

Yay295
Copy link
Contributor

@Yay295 Yay295 commented Mar 27, 2024

This entire file is skipped if Qt isn't available. This means teardown_module() is also skipped. But opening the images isn't skipped because they're not in a function. By moving the image loading to setup_module() it will also be skipped when Qt isn't available.

@radarhere radarhere added Testing Qt Qt for Python, PyQt, PySide labels Mar 27, 2024
@hugovk hugovk merged commit e3aeaa6 into python-pillow:main Mar 28, 2024
56 checks passed
@hugovk
Copy link
Member

hugovk commented Mar 28, 2024

Thanks!

@Yay295 Yay295 deleted the fix_unclosed_images branch March 28, 2024 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Qt Qt for Python, PyQt, PySide Testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants