mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
test for wrong channels number in generate
This commit is contained in:
parent
ecd0e5e15e
commit
fb1d25417e
|
@ -269,6 +269,10 @@ class TestColorLut3DFilter(PillowTestCase):
|
|||
|
||||
class TestGenerateColorLut3D(PillowTestCase):
|
||||
def test_wrong_channels_count(self):
|
||||
with self.assertRaisesRegexp(ValueError, "3 or 4 output channels"):
|
||||
ImageFilter.Color3DLUT.generate(5, channels=2,
|
||||
callback=lambda r, g, b: (r, g, b))
|
||||
|
||||
with self.assertRaisesRegexp(ValueError, "should have either channels"):
|
||||
ImageFilter.Color3DLUT.generate(5, lambda r, g, b: (r, g, b, r))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user