From 5ef5a3c9b276529e18351bb2e3f74664eee181af Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Wed, 6 Jun 2018 22:34:09 +1000 Subject: [PATCH] Corrected test --- Tests/test_file_tiff.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Tests/test_file_tiff.py b/Tests/test_file_tiff.py index 282a0c676..3d63e084d 100644 --- a/Tests/test_file_tiff.py +++ b/Tests/test_file_tiff.py @@ -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"