mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +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.
27 lines
583 B
Python
27 lines
583 B
Python
from tester import *
|
|
|
|
from PIL import Image
|
|
|
|
def test_sanity():
|
|
|
|
def convert(im, mode):
|
|
out = im.convert(mode)
|
|
assert_equal(out.mode, mode)
|
|
assert_equal(out.size, im.size)
|
|
|
|
modes = "1", "L", "I", "F", "RGB", "RGBA", "RGBX", "CMYK", "YCbCr"
|
|
|
|
for mode in modes:
|
|
im = lena(mode)
|
|
for mode in modes:
|
|
yield_test(convert, im, mode)
|
|
|
|
def test_default():
|
|
|
|
im = lena("P")
|
|
assert_image(im, "P", im.size)
|
|
im = im.convert()
|
|
assert_image(im, "RGB", im.size)
|
|
im = im.convert()
|
|
assert_image(im, "RGB", im.size)
|