mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Added context manager
This commit is contained in:
parent
023dbe3925
commit
63f21609c0
|
@ -571,8 +571,8 @@ class TestFilePng:
|
|||
assert len(chunks) == 3
|
||||
|
||||
def test_read_private_chunks(self):
|
||||
im = Image.open("Tests/images/exif.png")
|
||||
assert im.private_chunks == [(b"orNT", b"\x01")]
|
||||
with Image.open("Tests/images/exif.png") as im:
|
||||
assert im.private_chunks == [(b"orNT", b"\x01")]
|
||||
|
||||
def test_roundtrip_private_chunk(self):
|
||||
# Check private chunk roundtripping
|
||||
|
|
Loading…
Reference in New Issue
Block a user