aboutsummaryrefslogtreecommitdiffstats
path: root/test/metadata.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/metadata.py')
-rw-r--r--test/metadata.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/metadata.py b/test/metadata.py
index 1b098b1..7816277 100644
--- a/test/metadata.py
+++ b/test/metadata.py
@@ -530,6 +530,17 @@ class TestImageMetadata(unittest.TestCase):
for key in keys:
self.failUnlessRaises(KeyError, self.metadata.__delitem__, key)
+ def test_replace_tag_by_itself(self):
+ # Test that replacing an existing tag by itself
+ # doesn’t result in an ugly segmentation fault
+ # (see https://bugs.launchpad.net/pyexiv2/+bug/622739).
+ self.metadata.read()
+ keys = self.metadata.exif_keys + \
+ self.metadata.iptc_keys + \
+ self.metadata.xmp_keys
+ for key in keys:
+ self.metadata[key] = self.metadata[key]
+
##########################
# Test the image comment #
##########################