mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Added test for invalid image
This commit is contained in:
parent
4c02ae4061
commit
1ee1860b52
|
@ -30,6 +30,15 @@ class TestImage(PillowTestCase):
|
|||
# self.assertRaises(
|
||||
# MemoryError, lambda: Image.new("L", (1000000, 1000000)))
|
||||
|
||||
def test_invalid_image(self):
|
||||
if str is bytes:
|
||||
import StringIO
|
||||
im = StringIO.StringIO('')
|
||||
else:
|
||||
import io
|
||||
im = io.BytesIO(b'')
|
||||
self.assertRaises(IOError, lambda: Image.open(im))
|
||||
|
||||
def test_internals(self):
|
||||
|
||||
im = Image.new("L", (100, 100))
|
||||
|
|
Loading…
Reference in New Issue
Block a user