mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
30 lines
545 B
Python
30 lines
545 B
Python
from helper import unittest, PillowTestCase, lena
|
|
|
|
from PIL import ImageSequence
|
|
|
|
|
|
class TestImageSequence(PillowTestCase):
|
|
|
|
def test_sanity(self):
|
|
|
|
file = self.tempfile("temp.im")
|
|
|
|
im = lena("RGB")
|
|
im.save(file)
|
|
|
|
seq = ImageSequence.Iterator(im)
|
|
|
|
index = 0
|
|
for frame in seq:
|
|
self.assert_image_equal(im, frame)
|
|
self.assertEqual(im.tell(), index)
|
|
index += 1
|
|
|
|
self.assertEqual(index, 1)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|
|
|
|
# End of file
|