mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-29 17:33:08 +03:00
Test for similarity
This commit is contained in:
parent
fdf0737fcd
commit
7fba16b074
|
@ -163,7 +163,7 @@ class TestImageConvert(PillowTestCase):
|
||||||
self.assertRaises(ValueError,
|
self.assertRaises(ValueError,
|
||||||
lambda: im.convert(mode='L', matrix=matrix))
|
lambda: im.convert(mode='L', matrix=matrix))
|
||||||
|
|
||||||
def test_matrix_rgb(self):
|
def test_matrix_xyz(self):
|
||||||
|
|
||||||
def matrix_convert(mode):
|
def matrix_convert(mode):
|
||||||
# Arrange
|
# Arrange
|
||||||
|
@ -181,6 +181,8 @@ class TestImageConvert(PillowTestCase):
|
||||||
# Assert
|
# Assert
|
||||||
self.assertEqual(converted_im.mode, mode)
|
self.assertEqual(converted_im.mode, mode)
|
||||||
self.assertEqual(converted_im.size, im.size)
|
self.assertEqual(converted_im.size, im.size)
|
||||||
|
if converted_im.mode == 'RGB':
|
||||||
|
self.assert_image_similar(converted_im, im, 33)
|
||||||
|
|
||||||
matrix_convert('RGB')
|
matrix_convert('RGB')
|
||||||
matrix_convert('L')
|
matrix_convert('L')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user