Added SGI test for saving an image in an unsupported mode

This commit is contained in:
Andrew Murray 2017-08-07 19:21:54 +10:00
parent e0f69cb2e1
commit e4927b8f2f

View File

@ -55,6 +55,12 @@ class TestFileSgi(PillowTestCase):
for mode in ('L', 'RGB', 'RGBA'):
roundtrip(hopper(mode))
def test_unsupported_mode(self):
im = hopper('LA')
out = self.tempfile('temp.sgi')
self.assertRaises(ValueError, lambda: im.save(out, format='sgi'))
if __name__ == '__main__':
unittest.main()