mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-15 03:46:28 +03:00
Merge pull request #1680 from radarhere/asserts
Updated deprecated asserts
This commit is contained in:
commit
3d6e137ff2
|
@ -85,8 +85,8 @@ class TestFileTiff(PillowTestCase):
|
||||||
self.assertIsInstance(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], TiffImagePlugin.IFDRational))
|
self.assertIsInstance(im.tag_v2[X_RESOLUTION], TiffImagePlugin.IFDRational)
|
||||||
self.assert_(isinstance(im.tag_v2[Y_RESOLUTION], TiffImagePlugin.IFDRational))
|
self.assertIsInstance(im.tag_v2[Y_RESOLUTION], TiffImagePlugin.IFDRational)
|
||||||
|
|
||||||
self.assertEqual(im.info['dpi'], (72., 72.))
|
self.assertEqual(im.info['dpi'], (72., 72.))
|
||||||
|
|
||||||
|
|
|
@ -37,13 +37,13 @@ class Test_IFDRational(PillowTestCase):
|
||||||
|
|
||||||
xres = IFDRational(72)
|
xres = IFDRational(72)
|
||||||
yres = IFDRational(72)
|
yres = IFDRational(72)
|
||||||
self.assert_(xres._val is not None)
|
self.assertTrue(xres._val is not None)
|
||||||
self.assert_(xres.numerator is not None)
|
self.assertTrue(xres.numerator is not None)
|
||||||
self.assert_(xres.denominator is not None)
|
self.assertTrue(xres.denominator is not None)
|
||||||
self.assert_(yres._val is not None)
|
self.assertTrue(yres._val is not None)
|
||||||
|
|
||||||
self.assert_(xres and 1)
|
self.assertTrue(xres and 1)
|
||||||
self.assert_(xres and yres)
|
self.assertTrue(xres and yres)
|
||||||
|
|
||||||
|
|
||||||
def test_ifd_rational_save(self):
|
def test_ifd_rational_save(self):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user