diff --git a/tests/test_pydenticon.py b/tests/test_pydenticon.py index 515b271d5f54c864c7102efd5d138bea5667e67f..d501e299a1b1f6f7a37ff529196da8a92bafcfd2 100644 --- a/tests/test_pydenticon.py +++ b/tests/test_pydenticon.py @@ -189,7 +189,7 @@ class GeneratorTest(unittest.TestCase): self.assertEqual(image.size[0], 240) self.assertEqual(image.size[1], 240) self.assertEqual(image.format, "PNG") - self.assertEqual(image.mode, "RGB") + self.assertEqual(image.mode, "RGBA") def test_generate_ascii(self): """ @@ -359,10 +359,10 @@ class GeneratorTest(unittest.TestCase): height = 200 padding = (20, 20, 20, 20) - # Load the reference images, making sure they're in RGB mode. - test1_ref = PIL.Image.open("tests/samples/test1.png").convert(mode="RGB") - test2_ref = PIL.Image.open("tests/samples/test2.png").convert(mode="RGB") - test3_ref = PIL.Image.open("tests/samples/test3.png").convert(mode="RGB") + # Load the reference images, making sure they're in RGBA mode. + test1_ref = PIL.Image.open("tests/samples/test1.png").convert(mode="RGBA") + test2_ref = PIL.Image.open("tests/samples/test2.png").convert(mode="RGBA") + test3_ref = PIL.Image.open("tests/samples/test3.png").convert(mode="RGBA") # Set-up the Generator. generator = Generator(5, 5, foreground=foreground, background=background) @@ -389,7 +389,7 @@ class GeneratorTest(unittest.TestCase): # Verify that all the diffs are essentially black (i.e. no differences # between generated identicons and reference samples). - expected_extrema = ((0, 0), (0, 0), (0, 0)) + expected_extrema = ((0, 0), (0, 0), (0, 0), (0, 0)) self.assertEqual(diff1.getextrema(), expected_extrema) self.assertEqual(diff2.getextrema(), expected_extrema)