Merge pull request #3155 from radarhere/legacy_api_test

Corrected test
This commit is contained in:
Hugo 2018-06-06 17:00:52 +03:00 committed by GitHub
commit 02f99c5889
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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"