aboutsummaryrefslogtreecommitdiffstats
path: root/test/iptc.py
diff options
context:
space:
mode:
authorOlivier Tilloy <olivier@tilloy.net>2010-11-17 09:19:33 +0100
committerOlivier Tilloy <olivier@tilloy.net>2010-11-17 09:19:33 +0100
commit063b2729c2ad04b0b5385b369873294b51655bde (patch)
tree6042562704918c7e60991a68d09934ca19566dab /test/iptc.py
parent712d3725f35a9bfdb55b4bcf41dd194a5786ef32 (diff)
downloadpyexiv2-063b2729c2ad04b0b5385b369873294b51655bde.tar.gz
Throw an exception instead of silently failing when unable to parse the raw value for EXIF and IPTC tags.
Note that parsing never fails for XMP tags. Added corresponding unit tests.
Diffstat (limited to 'test/iptc.py')
-rw-r--r--test/iptc.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/iptc.py b/test/iptc.py
index 3b151a5..1940efd 100644
--- a/test/iptc.py
+++ b/test/iptc.py
@@ -190,3 +190,8 @@ class TestIptcTag(unittest.TestCase):
tag.values = ['Barcelona']
self.failIfEqual(tag.values, old_values)
+ def test_set_raw_values_invalid(self):
+ tag = IptcTag('Iptc.Envelope.DateSent')
+ values = ['foo']
+ self.failUnlessRaises(ValueError, tag._set_raw_values, values)
+