aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorOlivier Tilloy <olivier@tilloy.net>2010-01-19 09:43:11 +0100
committerOlivier Tilloy <olivier@tilloy.net>2010-01-19 09:43:11 +0100
commitb7b0316bfddefb2451308f1d4ea4edf35b45ff44 (patch)
treee8c1d638e7d3c1c1ad9d36e26c390009f5fc2b99 /test
parenta058842bb95cb5ccc9e37f949a01e20628b46436 (diff)
downloadpyexiv2-b7b0316bfddefb2451308f1d4ea4edf35b45ff44.tar.gz
Support the EXIF Comment type.
Diffstat (limited to 'test')
-rw-r--r--test/exif.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/exif.py b/test/exif.py
index 7b73966..1352bac 100644
--- a/test/exif.py
+++ b/test/exif.py
@@ -138,6 +138,22 @@ class TestExifTag(unittest.TestCase):
# Invalid values
self.failUnlessRaises(ExifValueError, tag._convert_to_string, None)
+ def test_convert_to_python_comment(self):
+ # Valid values
+ tag = ExifTag('Exif.Photo.UserComment')
+ self.assertEqual(tag.type, 'Comment')
+ self.assertEqual(tag._convert_to_python('A comment'), 'A comment')
+
+ def test_convert_to_string_comment(self):
+ # Valid values
+ tag = ExifTag('Exif.Photo.UserComment')
+ self.assertEqual(tag.type, 'Comment')
+ self.assertEqual(tag._convert_to_string('A comment'), 'A comment')
+ self.assertEqual(tag._convert_to_string(u'A comment'), 'A comment')
+
+ # Invalid values
+ self.failUnlessRaises(ExifValueError, tag._convert_to_string, None)
+
def test_convert_to_python_short(self):
# Valid values
tag = ExifTag('Exif.Image.BitsPerSample')