mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +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.
35 lines
1.1 KiB
Python
35 lines
1.1 KiB
Python
from tester import *
|
|
|
|
from PIL import Image
|
|
|
|
PIL151 = b"""
|
|
#define basic_width 32
|
|
#define basic_height 32
|
|
static char basic_bits[] = {
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00,
|
|
0x80, 0xff, 0xff, 0x01, 0x40, 0x00, 0x00, 0x02,
|
|
0x20, 0x00, 0x00, 0x04, 0x20, 0x00, 0x00, 0x04, 0x10, 0x00, 0x00, 0x08,
|
|
0x10, 0x00, 0x00, 0x08,
|
|
0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
|
|
0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x08,
|
|
0x20, 0x00, 0x00, 0x04,
|
|
0x20, 0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x02,
|
|
0x80, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
0x00, 0x00, 0x00, 0x00,
|
|
};
|
|
"""
|
|
|
|
def test_pil151():
|
|
|
|
im = Image.open(BytesIO(PIL151))
|
|
|
|
assert_no_exception(lambda: im.load())
|
|
assert_equal(im.mode, '1')
|
|
assert_equal(im.size, (32, 32))
|