diff options
author | Olivier Tilloy <olivier@tilloy.net> | 2010-11-17 09:38:02 +0100 |
---|---|---|
committer | Olivier Tilloy <olivier@tilloy.net> | 2010-11-17 09:38:02 +0100 |
commit | 3357ed0d4ffab468730c68ae9e4544209fc2eda2 (patch) | |
tree | 150c4f5b17fbb33f24ec4a6c6e2d31e96f13c17e | |
parent | 62eb79e4a06861c36faa98713edf35cb228246cf (diff) | |
download | pyexiv2-3357ed0d4ffab468730c68ae9e4544209fc2eda2.tar.gz |
Add a unit test to check that an exception is raised when trying to set multiple values to a non-repeatable IPTC tag.
-rw-r--r-- | test/iptc.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/iptc.py b/test/iptc.py index 1940efd..6da1580 100644 --- a/test/iptc.py +++ b/test/iptc.py @@ -195,3 +195,8 @@ class TestIptcTag(unittest.TestCase): values = ['foo'] self.failUnlessRaises(ValueError, tag._set_raw_values, values) + def test_set_values_non_repeatable(self): + tag = IptcTag('Iptc.Application2.ReleaseDate') + values = [datetime.date.today(), datetime.date.today()] + self.failUnlessRaises(KeyError, tag._set_values, values) + |