flip cases in metadata test

This commit is contained in:
olokelo 2024-03-19 22:27:51 +01:00
parent 58c37bf7eb
commit 48bbc2e2f8

View File

@ -76,14 +76,14 @@ def test_getxmp() -> None:
assert im.getxmp() == {} assert im.getxmp() == {}
with Image.open("Tests/images/flower2.jxl") as im: with Image.open("Tests/images/flower2.jxl") as im:
if ElementTree is None: if ElementTree:
assert (
im.getxmp()["xmpmeta"]["xmptk"]
== "Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27 "
)
else:
with pytest.warns( with pytest.warns(
UserWarning, UserWarning,
match="XMP data cannot be read without defusedxml dependency", match="XMP data cannot be read without defusedxml dependency",
): ):
assert im.getxmp() == {} assert im.getxmp() == {}
else:
assert (
im.getxmp()["xmpmeta"]["xmptk"]
== "Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27 "
)