Corrected test

This commit is contained in:
Andrew Murray 2018-06-06 22:34:09 +10:00
parent b5357c4e37
commit 5ef5a3c9b2

View File

@ -63,8 +63,11 @@ class TestFileTiff(PillowTestCase):
im.load()
def test_set_legacy_api(self):
with self.assertRaises(Exception):
ImageFileDirectory_v2.legacy_api = None
ifd = TiffImagePlugin.ImageFileDirectory_v2()
with self.assertRaises(Exception) as e:
ifd.legacy_api = None
self.assertEqual(str(e.exception),
"Not allowing setting of legacy api")
def test_xyres_tiff(self):
filename = "Tests/images/pil168.tif"