mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Fail on invalid EXIF, reverting ed2cca1
.
This commit is contained in:
parent
1b9b3749ca
commit
ba7b8d1708
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue
Block a user