diff --git a/Tests/test_file_tiff.py b/Tests/test_file_tiff.py index 350e68e42..9a9285ca6 100644 --- a/Tests/test_file_tiff.py +++ b/Tests/test_file_tiff.py @@ -84,10 +84,8 @@ class TestFileTiff(PillowTestCase): self.assertEqual(im.info['dpi'], (72., 72.)) def test_bad_exif(self): - try: - Image.open('Tests/images/hopper_bad_exif.jpg')._getexif() - except struct.error: - self.fail("Bad EXIF data should not pass incorrect values to _binary unpack") + image = Image.open('Tests/images/hopper_bad_exif.jpg') + self.assertRaises(Exception, image._getexif) def test_little_endian(self): im = Image.open('Tests/images/16bit.cropped.tif')