diff options
author | Olivier Tilloy <olivier@tilloy.net> | 2010-02-15 18:24:12 +0100 |
---|---|---|
committer | Olivier Tilloy <olivier@tilloy.net> | 2010-02-15 18:24:12 +0100 |
commit | b7a68a833a996bf490c602d6ff318fbf73997329 (patch) | |
tree | 03028af4293af78b6591b168e87d3eb0f1ba7775 | |
parent | 05d3f6cd613be7162442fa3afb39ea9862158f46 (diff) | |
download | pyexiv2-b7a68a833a996bf490c602d6ff318fbf73997329.tar.gz |
Make the unit tests choke on bug #522216.
-rw-r--r-- | test/metadata.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/metadata.py b/test/metadata.py index 6f66bfe..4ef933d 100644 --- a/test/metadata.py +++ b/test/metadata.py @@ -259,8 +259,10 @@ class TestImageMetadata(unittest.TestCase): # Create a new tag tag = ExifTag('Exif.Thumbnail.Orientation', 1) self.assertEqual(tag.metadata, None) + self.assert_(tag.key not in self.metadata.exif_keys) self.metadata._set_exif_tag(tag) self.assertEqual(tag.metadata, self.metadata) + self.assert_(tag.key in self.metadata.exif_keys) self.assertEqual(self.metadata._tags['exif'], {tag.key: tag}) self.assert_(self.metadata._image.tags['exif'].has_key(tag.key)) self.assertEqual(self.metadata._image.tags['exif'][tag.key], @@ -393,8 +395,10 @@ class TestImageMetadata(unittest.TestCase): # Create a new tag tag = IptcTag('Iptc.Application2.Writer', ['Nobody']) self.assertEqual(tag.metadata, None) + self.assert_(tag.key not in self.metadata.iptc_keys) self.metadata._set_iptc_tag(tag) self.assertEqual(tag.metadata, self.metadata) + self.assert_(tag.key in self.metadata.iptc_keys) self.assertEqual(self.metadata._tags['iptc'], {tag.key: tag}) self.assert_(self.metadata._image.tags['iptc'].has_key(tag.key)) self.assertEqual(self.metadata._image.tags['iptc'][tag.key], @@ -530,8 +534,10 @@ class TestImageMetadata(unittest.TestCase): tag = XmpTag('Xmp.dc.title', {'x-default': 'This is not a title', 'fr-FR': "Ceci n'est pas un titre"}) self.assertEqual(tag.metadata, None) + self.assert_(tag.key not in self.metadata.xmp_keys) self.metadata._set_xmp_tag(tag) self.assertEqual(tag.metadata, self.metadata) + self.assert_(tag.key in self.metadata.xmp_keys) self.assertEqual(self.metadata._tags['xmp'], {tag.key: tag}) self.assert_(self.metadata._image.tags['xmp'].has_key(tag.key)) self.assertEqual(self.metadata._image.tags['xmp'][tag.key], |