Fail on invalid EXIF, reverting ed2cca1.

This commit is contained in:
Antony Lee 2015-06-29 15:37:58 -07:00 committed by wiredfool
parent 1b9b3749ca
commit ba7b8d1708

View File

@ -93,16 +93,12 @@ class TestFileTiff(PillowTestCase):
lambda: TiffImagePlugin.TiffImageFile(invalid_file))
def test_bad_exif(self):
try:
Image.open('Tests/images/hopper_bad_exif.jpg')._getexif()
except struct.error:
self.fail(
"Bad EXIF data passed incorrect values to _binary unpack")
image = Image.open('Tests/images/hopper_bad_exif.jpg')
self.assertRaises(Exception, image._getexif)
def test_save_unsupported_mode(self):
im = hopper("HSV")
outfile = self.tempfile("temp.tif")
self.assertRaises(IOError, lambda: im.save(outfile))
def test_little_endian(self):