2014-06-10 13:10:47 +04:00
|
|
|
from helper import unittest, PillowTestCase, tearDownModule
|
2012-10-16 00:26:38 +04:00
|
|
|
|
|
|
|
from PIL import ImageFilter
|
|
|
|
|
|
|
|
|
2014-06-10 13:10:47 +04:00
|
|
|
class TestImageFilter(PillowTestCase):
|
2012-10-16 00:26:38 +04:00
|
|
|
|
2014-06-10 13:10:47 +04:00
|
|
|
def test_sanity(self):
|
|
|
|
# see test_image_filter for more tests
|
2012-10-16 00:26:38 +04:00
|
|
|
|
2014-06-10 13:10:47 +04:00
|
|
|
# Check these run. Exceptions cause failures.
|
|
|
|
ImageFilter.MaxFilter
|
|
|
|
ImageFilter.MedianFilter
|
|
|
|
ImageFilter.MinFilter
|
|
|
|
ImageFilter.ModeFilter
|
|
|
|
ImageFilter.Kernel((3, 3), list(range(9)))
|
|
|
|
ImageFilter.GaussianBlur
|
|
|
|
ImageFilter.GaussianBlur(5)
|
|
|
|
ImageFilter.UnsharpMask
|
|
|
|
ImageFilter.UnsharpMask(10)
|
2012-10-16 00:26:38 +04:00
|
|
|
|
2014-06-10 13:10:47 +04:00
|
|
|
ImageFilter.BLUR
|
|
|
|
ImageFilter.CONTOUR
|
|
|
|
ImageFilter.DETAIL
|
|
|
|
ImageFilter.EDGE_ENHANCE
|
|
|
|
ImageFilter.EDGE_ENHANCE_MORE
|
|
|
|
ImageFilter.EMBOSS
|
|
|
|
ImageFilter.FIND_EDGES
|
|
|
|
ImageFilter.SMOOTH
|
|
|
|
ImageFilter.SMOOTH_MORE
|
|
|
|
ImageFilter.SHARPEN
|
2012-10-16 00:26:38 +04:00
|
|
|
|
2014-06-10 13:10:47 +04:00
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
unittest.main()
|
|
|
|
|
|
|
|
# End of file
|