mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-06-01 03:33:21 +03:00
added tests for sgi writing
This commit is contained in:
parent
597ab45d4d
commit
3d185ee857
|
@ -45,6 +45,17 @@ class TestFileSgi(PillowTestCase):
|
||||||
lambda:
|
lambda:
|
||||||
SgiImagePlugin.SgiImageFile(invalid_file))
|
SgiImagePlugin.SgiImageFile(invalid_file))
|
||||||
|
|
||||||
|
def test_write(self):
|
||||||
|
def roundtrip(img):
|
||||||
|
out = self.tempfile('temp.sgi')
|
||||||
|
img.save(out, format='sgi')
|
||||||
|
reloaded = Image.open(out)
|
||||||
|
self.assert_image_equal(img, reloaded)
|
||||||
|
|
||||||
|
for mode in ('L', 'RGB', 'RGBA'):
|
||||||
|
roundtrip(hopper(mode))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user