Fredrik Lundh is sharing code with you

Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.

Don't show this again

effbot / pil-2009-raclette http://effbot.org/zone/pil-index.htm

Work repository for PIL 1.1.7 and beyond. The "default" branch should be fairly solid, the other branches less so. For production use, see the pil-117 repository.

Clone this repository (size: 1.6 MB): HTTPS / SSH
hg clone https://bitbucket.org/effbot/pil-2009-raclette
hg clone ssh://hg@bitbucket.org/effbot/pil-2009-raclette

pil-2009-raclette / Tests / test_imagefilter.py

from tester import *

from PIL import Image
from PIL import ImageFilter

def test_sanity():
    # see test_image_filter for more tests

    assert_no_exception(lambda: ImageFilter.MaxFilter)
    assert_no_exception(lambda: ImageFilter.MedianFilter)
    assert_no_exception(lambda: ImageFilter.MinFilter)
    assert_no_exception(lambda: ImageFilter.ModeFilter)
    assert_no_exception(lambda: ImageFilter.Kernel((3, 3), range(9)))
    assert_no_exception(lambda: ImageFilter.GaussianBlur)
    assert_no_exception(lambda: ImageFilter.GaussianBlur(5))
    assert_no_exception(lambda: ImageFilter.UnsharpMask)
    assert_no_exception(lambda: ImageFilter.UnsharpMask(10))

    assert_no_exception(lambda: ImageFilter.BLUR)
    assert_no_exception(lambda: ImageFilter.CONTOUR)
    assert_no_exception(lambda: ImageFilter.DETAIL)
    assert_no_exception(lambda: ImageFilter.EDGE_ENHANCE)
    assert_no_exception(lambda: ImageFilter.EDGE_ENHANCE_MORE)
    assert_no_exception(lambda: ImageFilter.EMBOSS)
    assert_no_exception(lambda: ImageFilter.FIND_EDGES)
    assert_no_exception(lambda: ImageFilter.SMOOTH)
    assert_no_exception(lambda: ImageFilter.SMOOTH_MORE)
    assert_no_exception(lambda: ImageFilter.SHARPEN)