Added tests

This commit is contained in:
Andrew Murray 2019-05-08 13:13:19 +10:00
parent ddc83fd8a7
commit 2787b9b991
2 changed files with 8 additions and 0 deletions

BIN
Tests/images/hopper_I.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -233,3 +233,11 @@ class TestImageConvert(PillowTestCase):
# Assert
# No change
self.assert_image_equal(converted_im, im)
def test_i_to_l(self):
im = Image.open("Tests/images/hopper_I.png").convert("L")
self.assert_image_similar(hopper("L"), im, 0.02)
def test_i_to_rgb(self):
im = Image.open("Tests/images/hopper_I.png").convert("RGB")
self.assert_image_similar(hopper("L").convert("RGB"), im, 0.05)