Pillow/Tests/test_imageenhance.py
Brian Crowell ad784eb808 py3k: Import Christoph Gohlke's test suite
This is Christoph Gohlke's test suite from his personal PIL package found
at http://www.lfd.uci.edu/~gohlke/pythonlibs/.

This is just to bring it in as a separate commit. Future commits will align
it with Pillow.
2013-01-10 08:46:39 -06:00

20 lines
582 B
Python

from tester import *
from PIL import Image
from PIL import ImageEnhance
def test_sanity():
# FIXME: assert_image
assert_no_exception(lambda: ImageEnhance.Color(lena()).enhance(0.5))
assert_no_exception(lambda: ImageEnhance.Contrast(lena()).enhance(0.5))
assert_no_exception(lambda: ImageEnhance.Brightness(lena()).enhance(0.5))
assert_no_exception(lambda: ImageEnhance.Sharpness(lena()).enhance(0.5))
def test_crash():
# crashes on small images
im = Image.new("RGB", (1, 1))
assert_no_exception(lambda: ImageEnhance.Sharpness(im).enhance(0.5))