mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-29 11:26:17 +03:00
Use isinstance to check type
This commit is contained in:
parent
17c48db318
commit
06b7b97a7a
|
@ -3,7 +3,8 @@ from PIL import Image
|
||||||
|
|
||||||
def test_getxmp():
|
def test_getxmp():
|
||||||
with Image.open("Tests/images/xmp_test.jpg") as im:
|
with Image.open("Tests/images/xmp_test.jpg") as im:
|
||||||
type_repr = repr(type(im.getxmp()))
|
xmp = im.getxmp()
|
||||||
|
|
||||||
|
assert isinstance(xmp, dict)
|
||||||
|
assert isinstance(xmp["Description"][0]["Version"], str)
|
||||||
|
|
||||||
assert "dict" in type_repr
|
|
||||||
assert isinstance(im.getxmp()["Description"][0]["Version"], str)
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user