test_sequence_tiff fixed (was not run by selftest.py)

This commit is contained in:
Kenny Ostrom 2014-08-26 10:46:44 -05:00
parent 6891989274
commit e6ad472c3b

View File

@ -6,9 +6,15 @@ TiffImagePlugin.READ_LIBTIFF = True
class TestFileTiff(PillowTestCase): class TestFileTiff(PillowTestCase):
def setUp(self):
codecs = dir(Image.core)
if "libtiff_encoder" not in codecs or "libtiff_decoder" not in codecs:
self.skipTest("tiff support not available")
def testSequence(self): def testSequence(self):
try: try:
im = Image.open('multi.tif') im = Image.open('Tests/images/multi.tif')
index = 0 index = 0
for frame in ImageSequence.Iterator(im): for frame in ImageSequence.Iterator(im):
frame.load() frame.load()
@ -17,4 +23,8 @@ class TestFileTiff(PillowTestCase):
except Exception as e: except Exception as e:
self.assertTrue(False, str(e)) self.assertTrue(False, str(e))
if __name__ == '__main__':
unittest.main()
# End of file