Added test case for gif image (mode L): optimization turned on, but not needed.

This commit is contained in:
Nikita Uvarov 2014-08-19 12:24:44 +03:00
parent 97e111d079
commit 9604cf814b

View File

@ -35,6 +35,14 @@ class TestFileGif(PillowTestCase):
self.assertEqual(test(0), 800)
self.assertEqual(test(1), 38)
def test_optimize_full_L(self):
from io import BytesIO
im = Image.frombytes("L", (16, 16), bytes(range(256)))
file = BytesIO()
im.save(file, "GIF", optimize=optimize)
self.assertEqual(im.mode, "L")
def test_roundtrip(self):
out = self.tempfile('temp.gif')
im = lena()