~ubuntu-branches/ubuntu/wily/python-imaging/wily

« back to all changes in this revision

Viewing changes to Tests/test_imagefilter.py

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-01-31 20:49:20 UTC
  • mfrom: (27.1.1 raring-proposed)
  • Revision ID: package-import@ubuntu.com-20130131204920-b5zshy6vgfvdionl
Tags: 1.1.7+1.7.8-1ubuntu1
Rewrite build dependencies to allow cross builds.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
from tester import *
 
2
 
 
3
from PIL import Image
 
4
from PIL import ImageFilter
 
5
 
 
6
def test_sanity():
 
7
    # see test_image_filter for more tests
 
8
 
 
9
    assert_no_exception(lambda: ImageFilter.MaxFilter)
 
10
    assert_no_exception(lambda: ImageFilter.MedianFilter)
 
11
    assert_no_exception(lambda: ImageFilter.MinFilter)
 
12
    assert_no_exception(lambda: ImageFilter.ModeFilter)
 
13
    assert_no_exception(lambda: ImageFilter.Kernel((3, 3), list(range(9))))
 
14
    assert_no_exception(lambda: ImageFilter.GaussianBlur)
 
15
    assert_no_exception(lambda: ImageFilter.GaussianBlur(5))
 
16
    assert_no_exception(lambda: ImageFilter.UnsharpMask)
 
17
    assert_no_exception(lambda: ImageFilter.UnsharpMask(10))
 
18
 
 
19
    assert_no_exception(lambda: ImageFilter.BLUR)
 
20
    assert_no_exception(lambda: ImageFilter.CONTOUR)
 
21
    assert_no_exception(lambda: ImageFilter.DETAIL)
 
22
    assert_no_exception(lambda: ImageFilter.EDGE_ENHANCE)
 
23
    assert_no_exception(lambda: ImageFilter.EDGE_ENHANCE_MORE)
 
24
    assert_no_exception(lambda: ImageFilter.EMBOSS)
 
25
    assert_no_exception(lambda: ImageFilter.FIND_EDGES)
 
26
    assert_no_exception(lambda: ImageFilter.SMOOTH)
 
27
    assert_no_exception(lambda: ImageFilter.SMOOTH_MORE)
 
28
    assert_no_exception(lambda: ImageFilter.SHARPEN)
 
29
 
 
30
 
 
31