1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
From 9c5a6fdbfe13fdeb593f96f3a4f132c5de2cf5bb Mon Sep 17 00:00:00 2001
From: Daniel Stender <stender@debian.org>
Date: Sun, 22 Jan 2017 18:27:23 +0100
Subject: test_exempi fix for exempi 2.4.0
Origin: https://github.com/hfiguiere/python-xmp-toolkit/commit/896f50a
Bug: https://github.com/python-xmp-toolkit/python-xmp-toolkit/issues/67
Bug-Debian: https://bugs.debian.org/851014
---
test/test_exempi.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/test/test_exempi.py b/test/test_exempi.py
index aafd59d..bfa9a7c 100644
--- a/test/test_exempi.py
+++ b/test/test_exempi.py
@@ -30,6 +30,7 @@ from libxmp.consts import XMP_NS_EXIF as NS_EXIF
from libxmp.consts import XMP_NS_Photoshop as NS_PHOTOSHOP
from libxmp.consts import XMP_NS_TIFF as NS_TIFF
from libxmp.consts import XMP_NS_XMP as NS_XAP
+from libxmp.consts import XMP_NS_XML as NS_XML
from libxmp.consts import XMP_NS_CameraRaw as NS_CAMERA_RAW_SETTINGS
from libxmp.consts import XMP_ITERATOR_OPTIONS, XMP_SERIAL_OPTIONS
from libxmp.consts import XMP_SKIP_OPTIONS
@@ -543,7 +544,10 @@ class TestIteration(unittest.TestCase):
options = XMP_ITERATOR_OPTIONS['iter_justleafname']
schemas, paths, props = self.collect_iteration(NS_DC, "rights", options)
- self.assertEqual(schemas, [NS_DC, NS_DC, NS_DC])
+ # in Exempi 2.4.0 and later, the actual namespace is returned.
+ # This was fixed in the Adobe SDK CS6 (version 5.4.0)
+ # So we test for both values since we can't check the version at runtime.
+ self.assertTrue(schemas == [NS_DC, NS_DC, NS_DC] or schemas == [NS_DC, '', NS_XML])
self.assertEqual(paths,
['dc:rights',
'[1]',
|