Skip to content

Commit 3e5df07

Browse files
authored
Fix unclosed file warning (#9065)
2 parents d58f4d5 + e88f312 commit 3e5df07

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Tests/test_file_libtiff.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -873,8 +873,8 @@ def test_lzma(self, capfd: pytest.CaptureFixture[str]) -> None:
873873
assert im.mode == "RGB"
874874
assert im.size == (128, 128)
875875
assert im.format == "TIFF"
876-
im2 = hopper()
877-
assert_image_similar(im, im2, 5)
876+
with hopper() as im2:
877+
assert_image_similar(im, im2, 5)
878878
except OSError:
879879
captured = capfd.readouterr()
880880
if "LZMA compression support is not configured" in captured.err:

0 commit comments

Comments
 (0)