mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
Merge pull request #1598 from radarhere/asserts
Updated deprecated asserts
This commit is contained in:
commit
19b66328d5
|
@ -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.))
|
||||
|
||||
|
|
|
@ -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__':
|
||||
|
|
Loading…
Reference in New Issue
Block a user