mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 18:26:17 +03:00
Added tests
This commit is contained in:
parent
1e56ed8c00
commit
0a1fae8c2d
|
@ -94,6 +94,15 @@ class TestImageFilter(PillowTestCase):
|
|||
self.assertEqual(rankfilter.size, 1)
|
||||
self.assertEqual(rankfilter.rank, 2)
|
||||
|
||||
def test_kernel_not_enough_coefficients(self):
|
||||
self.assertRaises(ValueError,
|
||||
lambda: ImageFilter.Kernel((3, 3), (0, 0)))
|
||||
|
||||
def test_kernel_filter_p(self):
|
||||
kernel = ImageFilter.Kernel((2, 2), (0, 0, 0, 0))
|
||||
|
||||
self.assertRaises(ValueError, kernel.filter, hopper("P"))
|
||||
|
||||
def test_consistency_3x3(self):
|
||||
source = Image.open("Tests/images/hopper.bmp")
|
||||
reference = Image.open("Tests/images/hopper_emboss.bmp")
|
||||
|
|
Loading…
Reference in New Issue
Block a user