diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py index 2ca234173..9e6db85f6 100644 --- a/Tests/test_file_gif.py +++ b/Tests/test_file_gif.py @@ -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