Pillow/Tests/test_sgi_crash.py
2020-04-01 10:12:21 +03:00

16 lines
432 B
Python

#!/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()