mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
Test matrix convert for ValueError: image has wrong mode
This commit is contained in:
parent
90dac5f4dc
commit
fdf0737fcd
|
@ -150,6 +150,19 @@ class TestImageConvert(PillowTestCase):
|
|||
self.assertRaises(ValueError,
|
||||
lambda: im.convert(mode='CMYK', matrix=matrix))
|
||||
|
||||
def test_matrix_wrong_mode(self):
|
||||
# Arrange
|
||||
im = hopper('L')
|
||||
matrix = (
|
||||
0.412453, 0.357580, 0.180423, 0,
|
||||
0.212671, 0.715160, 0.072169, 0,
|
||||
0.019334, 0.119193, 0.950227, 0)
|
||||
self.assertEqual(im.mode, 'L')
|
||||
|
||||
# Act / Assert
|
||||
self.assertRaises(ValueError,
|
||||
lambda: im.convert(mode='L', matrix=matrix))
|
||||
|
||||
def test_matrix_rgb(self):
|
||||
|
||||
def matrix_convert(mode):
|
||||
|
|
Loading…
Reference in New Issue
Block a user