Updated deprecated asserts

This commit is contained in:
Andrew Murray 2015-12-16 14:30:17 +11:00
parent 64f11cd227
commit afa4166a57
2 changed files with 5 additions and 5 deletions

View File

@ -81,12 +81,12 @@ class TestFileTiff(PillowTestCase):
im = Image.open(filename) im = Image.open(filename)
# legacy api # legacy api
self.assert_(isinstance(im.tag[X_RESOLUTION][0], tuple)) self.assertIsInstance(im.tag[X_RESOLUTION][0], tuple)
self.assert_(isinstance(im.tag[Y_RESOLUTION][0], tuple)) self.assertIsInstance(im.tag[Y_RESOLUTION][0], tuple)
# v2 api # v2 api
self.assert_(isinstance(im.tag_v2[X_RESOLUTION], float)) self.assertIsInstance(im.tag_v2[X_RESOLUTION], float)
self.assert_(isinstance(im.tag_v2[Y_RESOLUTION], float)) self.assertIsInstance(im.tag_v2[Y_RESOLUTION], float)
self.assertEqual(im.info['dpi'], (72., 72.)) self.assertEqual(im.info['dpi'], (72., 72.))

View File

@ -163,7 +163,7 @@ class TestFileTiffMetadata(PillowTestCase):
im = Image.open('Tests/images/hopper.iccprofile_binary.tif') im = Image.open('Tests/images/hopper.iccprofile_binary.tif')
self.assertEqual(im.tag_v2.tagtype[34675], 1) self.assertEqual(im.tag_v2.tagtype[34675], 1)
self.assert_(im.info['icc_profile']) self.assertTrue(im.info['icc_profile'])
if __name__ == '__main__': if __name__ == '__main__':