Skip to content

Use context managers in tests#4232

Merged
hugovk merged 1 commit intopython-pillow:masterfrom
radarhere:contextmanagers
Nov 30, 2019
Merged

Use context managers in tests#4232
hugovk merged 1 commit intopython-pillow:masterfrom
radarhere:contextmanagers

Conversation

@radarhere
Copy link
Member

Resolves #2818

The remaining ' = Image.open' lines in the test suite are either related to file pointer management or would involve restructuring the test code more significantly.

This is also good because it means that we're practicing what we preach - that opening an image should not be closed implicitly as of #3577

@hugovk
Copy link
Member

hugovk commented Nov 30, 2019

Thanks!

@hugovk hugovk merged commit 1e73519 into python-pillow:master Nov 30, 2019
@radarhere radarhere deleted the contextmanagers branch November 30, 2019 09:27
@hugovk hugovk mentioned this pull request Dec 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switching to context managers in Tests

2 participants