aboutsummaryrefslogtreecommitdiffstats
path: root/test/exif.py
diff options
context:
space:
mode:
authorOlivier Tilloy <olivier@tilloy.net>2011-08-20 11:48:40 +0200
committerOlivier Tilloy <olivier@tilloy.net>2011-08-20 11:48:40 +0200
commitf241ae6e91572a2bcddb3a04d0937ff5ddf407c6 (patch)
treea5dab05c6f0282e041443d923030f0db051f488c /test/exif.py
parenta58c3fe66ae7f11d98e5ecfb9f6dd01f5ec1c5be (diff)
downloadpyexiv2-f241ae6e91572a2bcddb3a04d0937ff5ddf407c6.tar.gz
Check the integrity of the image before performing the actual test.
Diffstat (limited to 'test/exif.py')
-rw-r--r--test/exif.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/exif.py b/test/exif.py
index 7f45b4e..5736562 100644
--- a/test/exif.py
+++ b/test/exif.py
@@ -30,6 +30,8 @@ from pyexiv2.exif import ExifTag, ExifValueError
from pyexiv2.metadata import ImageMetadata
from pyexiv2.utils import make_fraction
+from testutils import CheckFileSum
+
import datetime
@@ -348,6 +350,9 @@ class TestExifTag(unittest.TestCase):
self.assertEqual(tag2.type, 'Undefined')
self.failUnlessRaises(ValueError, getattr, tag2, 'value')
+ filename = 'test/data/pentax-makernote.jpg'
+ checksum = '646804b309a4a2d31feafe9bffc5d7f0'
+ self.assert_(CheckFileSum(filename, checksum))
metadata = ImageMetadata('test/data/pentax-makernote.jpg')
metadata.read()
tag1 = metadata[tag1.key]