diff options
author | Olivier Tilloy <olivier@tilloy.net> | 2009-02-25 19:38:34 +0100 |
---|---|---|
committer | Olivier Tilloy <olivier@tilloy.net> | 2009-02-25 19:38:34 +0100 |
commit | 79af14a148ea4d7b79db5a0f01b4db4ab590d1b1 (patch) | |
tree | bf66ff1b79752bd76f05c8c155eaa67e44d6025d /unittest/iptc.py | |
parent | 07b77b0d18d9c7c90e89804791d5d78dc13017e6 (diff) | |
download | pyexiv2-79af14a148ea4d7b79db5a0f01b4db4ab590d1b1.tar.gz |
IPTC Undefined to string conversion.
Diffstat (limited to 'unittest/iptc.py')
-rw-r--r-- | unittest/iptc.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/unittest/iptc.py b/unittest/iptc.py index 70eb977..9987b9d 100644 --- a/unittest/iptc.py +++ b/unittest/iptc.py @@ -151,3 +151,13 @@ class TestIptcTag(unittest.TestCase): 'Some binary data.') self.assertEqual(IptcTag._convert_to_python('�lj1�eEϟ�u����ᒻ;C(�SpI]���QI�}', xtype), '�lj1�eEϟ�u����ᒻ;C(�SpI]���QI�}') + + def test_convert_to_string_undefined(self): + xtype = 'Undefined' + # Valid values + self.assertEqual(IptcTag._convert_to_string('Some binary data.', xtype), + 'Some binary data.') + self.assertEqual(IptcTag._convert_to_string('�lj1�eEϟ�u����ᒻ;C(�SpI]���QI�}', xtype), + '�lj1�eEϟ�u����ᒻ;C(�SpI]���QI�}') + # Invalid values + self.failUnlessRaises(IptcValueError, IptcTag._convert_to_string, None, xtype) |