Added SGI test for an incorrect number of bands

This commit is contained in:
Andrew Murray 2017-08-07 20:10:39 +10:00
parent e4927b8f2f
commit 667fff7862

View File

@ -61,6 +61,13 @@ class TestFileSgi(PillowTestCase):
self.assertRaises(ValueError, lambda: im.save(out, format='sgi'))
def test_incorrect_number_of_bands(self):
im = hopper('YCbCr')
im.mode = 'RGB'
out = self.tempfile('temp.sgi')
self.assertRaises(ValueError, lambda: im.save(out, format='sgi'))
if __name__ == '__main__':
unittest.main()