Pillow/Tests/test_imageenhance.py

29 lines
660 B
Python
Raw Normal View History

2014-07-07 21:03:50 +04:00
from helper import unittest, PillowTestCase, lena
from PIL import Image
from PIL import ImageEnhance
2014-06-10 13:10:47 +04:00
class TestImageEnhance(PillowTestCase):
2014-06-10 13:10:47 +04:00
def test_sanity(self):
2014-06-10 13:10:47 +04:00
# FIXME: assert_image
# Implicit asserts no exception:
ImageEnhance.Color(lena()).enhance(0.5)
ImageEnhance.Contrast(lena()).enhance(0.5)
ImageEnhance.Brightness(lena()).enhance(0.5)
ImageEnhance.Sharpness(lena()).enhance(0.5)
2014-06-10 13:10:47 +04:00
def test_crash(self):
# crashes on small images
im = Image.new("RGB", (1, 1))
ImageEnhance.Sharpness(im).enhance(0.5)
if __name__ == '__main__':
unittest.main()
# End of file