Pillow/Tests/test_sgi_crash.py

16 lines
432 B
Python
Raw Normal View History

2020-03-28 16:19:27 +03:00
#!/usr/bin/env python
from .helper import PillowTestCase
from PIL import Image
repro = ('Tests/images/sgi_overrun_expandrowF04.bin',
'Tests/images/sgi_crash.bin',
)
class TestSgiCrashes(PillowTestCase):
def test_crashes(self):
for path in repro:
with open(path, 'rb') as f:
im = Image.open(f)
with self.assertRaises(IOError):
im.load()