mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
Add dispose test
This commit is contained in:
parent
5a902bf8a2
commit
5b5d47863e
|
@ -259,6 +259,28 @@ class TestFileGif(PillowTestCase):
|
|||
except EOFError:
|
||||
pass
|
||||
|
||||
def test_save_dispose(self):
|
||||
out = self.tempfile('temp.gif')
|
||||
im_list = [
|
||||
Image.new('L', (100, 100), '#000'),
|
||||
Image.new('L', (100, 100), '#111'),
|
||||
Image.new('L', (100, 100), '#222'),
|
||||
]
|
||||
for method in range(0,4):
|
||||
im_list[0].save(
|
||||
out,
|
||||
save_all=True,
|
||||
append_images=im_list[1:],
|
||||
disposal=method
|
||||
)
|
||||
img = Image.open(out)
|
||||
try:
|
||||
while True:
|
||||
img.seek(img.tell() + 1)
|
||||
self.assertEqual(img.disposal_method, method)
|
||||
except EOFError:
|
||||
pass
|
||||
|
||||
def test_iss634(self):
|
||||
img = Image.open("Tests/images/iss634.gif")
|
||||
# seek to the second frame
|
||||
|
|
Loading…
Reference in New Issue
Block a user