mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 09:56:17 +03:00
ad784eb808
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.
20 lines
582 B
Python
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))
|
|
|