Merge pull request #1680 from radarhere/asserts

Updated deprecated asserts
This commit is contained in:
Hugo 2016-01-24 22:54:53 +02:00
commit 3d6e137ff2
2 changed files with 18 additions and 18 deletions

View File

@ -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.))

View File

@ -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):