diff --git a/Tests/test_file_sgi.py b/Tests/test_file_sgi.py index 7af9d0949..3201889d4 100644 --- a/Tests/test_file_sgi.py +++ b/Tests/test_file_sgi.py @@ -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()