diff --git a/Tests/test_file_jpeg.py b/Tests/test_file_jpeg.py index 7b58fc426..f46414370 100644 --- a/Tests/test_file_jpeg.py +++ b/Tests/test_file_jpeg.py @@ -119,7 +119,7 @@ class TestFileJpeg(PillowTestCase): # using a 4-byte test code should allow us to detect out of # order issues. icc_profile = (b"Test"*int(n/4+1))[:n] - assert len(icc_profile) == n # sanity + self.assertEqual(len(icc_profile), n) # sanity im1 = self.roundtrip(hopper(), icc_profile=icc_profile) self.assertEqual(im1.info.get("icc_profile"), icc_profile or None) test(0) diff --git a/Tests/test_image_quantize.py b/Tests/test_image_quantize.py index d9f52fb03..6a9ff1187 100644 --- a/Tests/test_image_quantize.py +++ b/Tests/test_image_quantize.py @@ -27,14 +27,14 @@ class TestImageQuantize(PillowTestCase): raise self.assert_image(converted, 'P', converted.size) self.assert_image_similar(converted.convert('RGB'), image, 15) - assert len(converted.getcolors()) == 100 + self.assertEqual(len(converted.getcolors()), 100) def test_octree_quantize(self): image = hopper() converted = image.quantize(100, Image.FASTOCTREE) self.assert_image(converted, 'P', converted.size) self.assert_image_similar(converted.convert('RGB'), image, 20) - assert len(converted.getcolors()) == 100 + self.assertEqual(len(converted.getcolors()), 100) def test_rgba_quantize(self): image = hopper('RGBA') diff --git a/Tests/test_image_resample.py b/Tests/test_image_resample.py index ee5a062c6..4223db530 100644 --- a/Tests/test_image_resample.py +++ b/Tests/test_image_resample.py @@ -422,7 +422,7 @@ class CoreResampleBoxTest(PillowTestCase): def test_tiles(self): im = Image.open("Tests/images/flower.jpg") - assert im.size == (480, 360) + self.assertEqual(im.size, (480, 360)) dst_size = (251, 188) reference = im.resize(dst_size, Image.BICUBIC) @@ -434,7 +434,7 @@ class CoreResampleBoxTest(PillowTestCase): # This test shows advantages of the subpixel resizing # after supersampling (e.g. during JPEG decoding). im = Image.open("Tests/images/flower.jpg") - assert im.size == (480, 360) + self.assertEqual(im.size, (480, 360)) dst_size = (48, 36) # Reference is cropped image resized to destination reference = im.crop((0, 0, 473, 353)).resize(dst_size, Image.BICUBIC)