Merge pull request #1598 from radarhere/asserts

Updated deprecated asserts
This commit is contained in:
Hugo 2015-12-16 09:28:13 +02:00
commit 19b66328d5
2 changed files with 5 additions and 5 deletions

View File

@ -81,12 +81,12 @@ class TestFileTiff(PillowTestCase):
im = Image.open(filename)
# legacy api
self.assert_(isinstance(im.tag[X_RESOLUTION][0], tuple))
self.assert_(isinstance(im.tag[Y_RESOLUTION][0], tuple))
self.assertIsInstance(im.tag[X_RESOLUTION][0], tuple)
self.assertIsInstance(im.tag[Y_RESOLUTION][0], tuple)
# v2 api
self.assert_(isinstance(im.tag_v2[X_RESOLUTION], float))
self.assert_(isinstance(im.tag_v2[Y_RESOLUTION], float))
self.assertIsInstance(im.tag_v2[X_RESOLUTION], float)
self.assertIsInstance(im.tag_v2[Y_RESOLUTION], float)
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')
self.assertEqual(im.tag_v2.tagtype[34675], 1)
self.assert_(im.info['icc_profile'])
self.assertTrue(im.info['icc_profile'])
if __name__ == '__main__':