mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-29 02:34:10 +03:00
Use context manager
This commit is contained in:
parent
3e9403af56
commit
17c48db318
|
@ -2,7 +2,7 @@ from PIL import Image
|
||||||
|
|
||||||
|
|
||||||
def test_getxmp():
|
def test_getxmp():
|
||||||
im = Image.open("Tests/images/xmp_test.jpg")
|
with Image.open("Tests/images/xmp_test.jpg") as im:
|
||||||
type_repr = repr(type(im.getxmp()))
|
type_repr = repr(type(im.getxmp()))
|
||||||
|
|
||||||
assert "dict" in type_repr
|
assert "dict" in type_repr
|
||||||
|
|
Loading…
Reference in New Issue
Block a user