Pillow/Tests/check_j2k_overflow.py

16 lines
356 B
Python
Raw Normal View History

from PIL import Image
from .helper import unittest, PillowTestCase
2016-08-04 09:40:12 +03:00
class TestJ2kEncodeOverflow(PillowTestCase):
def test_j2k_overflow(self):
2019-06-13 18:53:42 +03:00
im = Image.new("RGBA", (1024, 131584))
target = self.tempfile("temp.jpc")
with self.assertRaises(IOError):
im.save(target)
2018-03-03 12:54:00 +03:00
2019-06-13 18:53:42 +03:00
if __name__ == "__main__":
unittest.main()