aboutsummaryrefslogtreecommitdiffstats
path: root/unittest
diff options
context:
space:
mode:
authorOlivier Tilloy <olivier@tilloy.net>2009-03-09 19:39:54 +0100
committerOlivier Tilloy <olivier@tilloy.net>2009-03-09 19:39:54 +0100
commitab8fda2c128eeaa45f71d2e27da7e627c439d251 (patch)
tree7727293be16f8b844e6ce8dac9d381f101042a7c /unittest
parent3c23acdb070d2c3230f3ecf497b4fbd760f5a10e (diff)
downloadpyexiv2-ab8fda2c128eeaa45f71d2e27da7e627c439d251.tar.gz
EXIF Undefined to string conversion.
Diffstat (limited to 'unittest')
-rw-r--r--unittest/exif.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/unittest/exif.py b/unittest/exif.py
index 0f7df8f..419b2dd 100644
--- a/unittest/exif.py
+++ b/unittest/exif.py
@@ -174,3 +174,11 @@ class TestExifTag(unittest.TestCase):
u'Digital still camera')
# Invalid values
self.failUnlessRaises(ExifValueError, ExifTag._convert_to_python, 'abc', xtype, None)
+
+ def test_convert_to_string_undefined(self):
+ xtype = 'Undefined'
+ # Valid values
+ self.assertEqual(ExifTag._convert_to_string('48 49 48 48 ', xtype), '48 49 48 48 ')
+ self.assertEqual(ExifTag._convert_to_string(u'48 49 48 48 ', xtype), '48 49 48 48 ')
+ # Invalid values
+ self.failUnlessRaises(ExifValueError, ExifTag._convert_to_string, 3, xtype)