From 48bbc2e2f845d69d687044dfbc3eb7df4544e93e Mon Sep 17 00:00:00 2001 From: olokelo Date: Tue, 19 Mar 2024 22:27:51 +0100 Subject: [PATCH] flip cases in metadata test --- Tests/test_file_jxl_metadata.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Tests/test_file_jxl_metadata.py b/Tests/test_file_jxl_metadata.py index a7cd2c925..639624c2d 100644 --- a/Tests/test_file_jxl_metadata.py +++ b/Tests/test_file_jxl_metadata.py @@ -76,14 +76,14 @@ def test_getxmp() -> None: assert im.getxmp() == {} 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( UserWarning, match="XMP data cannot be read without defusedxml dependency", ): assert im.getxmp() == {} - else: - assert ( - im.getxmp()["xmpmeta"]["xmptk"] - == "Adobe XMP Core 5.3-c011 66.145661, 2012/02/06-14:56:27 " - )