From e4927b8f2fd7c8af6e90809359ab397d88cf94ec Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Mon, 7 Aug 2017 19:21:54 +1000 Subject: [PATCH] Added SGI test for saving an image in an unsupported mode --- Tests/test_file_sgi.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Tests/test_file_sgi.py b/Tests/test_file_sgi.py index c9aeea76c..7af9d0949 100644 --- a/Tests/test_file_sgi.py +++ b/Tests/test_file_sgi.py @@ -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()