Merge pull request #4200 from radarhere/context_manager

Corrected context manager test
This commit is contained in:
Andrew Murray 2019-11-07 18:45:44 +11:00 committed by GitHub
commit 3418e2c18f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,9 +36,8 @@ class TestImagePsd(PillowTestCase):
def test_context_manager(self):
def open():
im = Image.open(test_file)
im.load()
im.close()
with Image.open(test_file) as im:
im.load()
self.assert_warning(None, open)