basic sanity test for webp

This commit is contained in:
wiredfool 2013-03-19 11:43:45 -07:00
parent 3c93da2008
commit 95353cff15

27
Tests/test_file_webp.py Normal file
View File

@ -0,0 +1,27 @@
from tester import *
from PIL import Image
def test_sanity():
file = "Images/lena.webp"
im = Image.open(file)
assert_equal(im.mode, "RGB")
assert_equal(im.size, (128, 128))
assert_equal(im.format, "WEBP")
file = tempfile("temp.webp")
lena("RGB").save(file)
im = Image.open(file)
im.load()
assert_equal(im.mode, "RGB")
assert_equal(im.size, (128, 128))
assert_equal(im.format, "WEBP")