diff options
author | Olivier Tilloy <olivier@tilloy.net> | 2010-01-19 09:43:11 +0100 |
---|---|---|
committer | Olivier Tilloy <olivier@tilloy.net> | 2010-01-19 09:43:11 +0100 |
commit | b7b0316bfddefb2451308f1d4ea4edf35b45ff44 (patch) | |
tree | e8c1d638e7d3c1c1ad9d36e26c390009f5fc2b99 /test | |
parent | a058842bb95cb5ccc9e37f949a01e20628b46436 (diff) | |
download | pyexiv2-b7b0316bfddefb2451308f1d4ea4edf35b45ff44.tar.gz |
Support the EXIF Comment type.
Diffstat (limited to 'test')
-rw-r--r-- | test/exif.py | 16 |
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') |