Added test

This commit is contained in:
Andrew Murray 2020-08-04 21:58:03 +10:00
parent 45b228e835
commit 0af193afc0

View File

@ -244,3 +244,8 @@ class TestPyDecoder:
im = MockImageFile(buf)
assert im.format is None
assert im.get_format_mimetype() is None
def test_oserror(self):
im = Image.new("RGB", (1, 1))
with pytest.raises(OSError):
im.save(BytesIO(), "JPEG2000")