Test XVThumbImagePlugin for correctness

This commit is contained in:
hugovk 2017-03-04 19:54:06 +02:00
parent 7371e813f6
commit c79204bf08

View File

@ -1,10 +1,20 @@
from helper import unittest, PillowTestCase
from helper import hopper, unittest, PillowTestCase
from PIL import XVThumbImagePlugin
from PIL import Image, XVThumbImagePlugin
TEST_FILE = "Tests/images/hopper.p7"
class TestFileXVThumb(PillowTestCase):
def test_open(self):
# Act
im = Image.open(TEST_FILE)
# Assert
self.assertEqual(im.format, "XVThumb")
self.assert_image_similar(im, hopper("P"), 49)
def test_invalid_file(self):
invalid_file = "Tests/images/flower.jpg"