From 2a75de2ce89771b85db65d518789773b27991014 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Wed, 19 Feb 2020 19:41:36 +1100 Subject: [PATCH] Updated tests --- Tests/test_imagechops.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Tests/test_imagechops.py b/Tests/test_imagechops.py index 3378b6bd049..94670b71ca2 100644 --- a/Tests/test_imagechops.py +++ b/Tests/test_imagechops.py @@ -363,10 +363,10 @@ def test_subtract_modulo_no_clip(): new = ImageChops.subtract_modulo(im1, im2) # Assert - self.assertEqual(new.getpixel((50, 50)), (241, 167, 127)) + assert new.getpixel((50, 50)) == (241, 167, 127) -def test_soft_light(self): +def test_soft_light(): # Arrange im1 = Image.open("Tests/images/hopper.png") im2 = Image.open("Tests/images/hopper-XYZ.png") @@ -375,11 +375,11 @@ def test_soft_light(self): new = ImageChops.soft_light(im1, im2) # Assert - self.assertEqual(new.getpixel((64, 64)), (163, 54, 32)) - self.assertEqual(new.getpixel((15, 100)), (1, 1, 3)) + assert new.getpixel((64, 64)) == (163, 54, 32) + assert new.getpixel((15, 100)) == (1, 1, 3) -def test_hard_light(self): +def test_hard_light(): # Arrange im1 = Image.open("Tests/images/hopper.png") im2 = Image.open("Tests/images/hopper-XYZ.png") @@ -388,11 +388,11 @@ def test_hard_light(self): new = ImageChops.hard_light(im1, im2) # Assert - self.assertEqual(new.getpixel((64, 64)), (144, 50, 27)) - self.assertEqual(new.getpixel((15, 100)), (1, 1, 2)) + assert new.getpixel((64, 64)) == (144, 50, 27) + assert new.getpixel((15, 100)) == (1, 1, 2) -def test_overlay(self): +def test_overlay(): # Arrange im1 = Image.open("Tests/images/hopper.png") im2 = Image.open("Tests/images/hopper-XYZ.png") @@ -401,8 +401,8 @@ def test_overlay(self): new = ImageChops.overlay(im1, im2) # Assert - self.assertEqual(new.getpixel((64, 64)), (159, 50, 27)) - self.assertEqual(new.getpixel((15, 100)), (1, 1, 2)) + assert new.getpixel((64, 64)) == (159, 50, 27) + assert new.getpixel((15, 100)) == (1, 1, 2) def test_logical():