From d79f2bb7dc9a49262b01077398dc95d92cffac9b Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Wed, 6 Nov 2019 20:12:19 +1100 Subject: [PATCH] Corrected context manager test --- Tests/test_file_psd.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Tests/test_file_psd.py b/Tests/test_file_psd.py index f57deff6a..939485f67 100644 --- a/Tests/test_file_psd.py +++ b/Tests/test_file_psd.py @@ -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)