Changed assertTrue isinstance to assertIsInstance

This commit is contained in:
Andrew Murray 2015-12-08 20:31:02 +11:00
parent 5f1a042293
commit ee82f7089c
3 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@ class TestImageToBytes(PillowTestCase):
def test_sanity(self): def test_sanity(self):
data = hopper().tobytes() data = hopper().tobytes()
self.assertTrue(isinstance(data, bytes)) self.assertIsInstance(data, bytes)
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()

View File

@ -15,7 +15,7 @@ class TestToQImage(PillowQtTestCase, PillowTestCase):
for mode in ('1', 'RGB', 'RGBA', 'L', 'P'): for mode in ('1', 'RGB', 'RGBA', 'L', 'P'):
data = ImageQt.toqimage(hopper(mode)) data = ImageQt.toqimage(hopper(mode))
self.assertTrue(isinstance(data, QImage)) self.assertIsInstance(data, QImage)
self.assertFalse(data.isNull()) self.assertFalse(data.isNull())
# Test saving the file # Test saving the file

View File

@ -15,7 +15,7 @@ class TestToQPixmap(PillowQPixmapTestCase, PillowTestCase):
for mode in ('1', 'RGB', 'RGBA', 'L', 'P'): for mode in ('1', 'RGB', 'RGBA', 'L', 'P'):
data = ImageQt.toqpixmap(hopper(mode)) data = ImageQt.toqpixmap(hopper(mode))
self.assertTrue(isinstance(data, QPixmap)) self.assertIsInstance(data, QPixmap)
self.assertFalse(data.isNull()) self.assertFalse(data.isNull())
# Test saving the file # Test saving the file