mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-03-03 19:45:56 +03:00
Reduced JPEG2000 test iterations, and added cleanup for decoding using PyPy
This commit is contained in:
parent
72e2a6cade
commit
7db19efe75
|
@ -227,6 +227,8 @@ class ImageFile(Image.Image):
|
||||||
break
|
break
|
||||||
b = b[n:]
|
b = b[n:]
|
||||||
t = t + n
|
t = t + n
|
||||||
|
# Need to cleanup here to prevent leaks in PyPy
|
||||||
|
d.cleanup()
|
||||||
|
|
||||||
self.tile = []
|
self.tile = []
|
||||||
self.readonly = readonly
|
self.readonly = readonly
|
||||||
|
|
|
@ -7,7 +7,7 @@ from PIL import Image
|
||||||
# Limits for testing the leak
|
# Limits for testing the leak
|
||||||
mem_limit = 768*1048576
|
mem_limit = 768*1048576
|
||||||
stack_size = 8*1048576
|
stack_size = 8*1048576
|
||||||
iterations = int((mem_limit/stack_size)*20)
|
iterations = int((mem_limit/stack_size)*2)
|
||||||
codecs = dir(Image.core)
|
codecs = dir(Image.core)
|
||||||
test_file = "Tests/images/rgb_trns_ycbc.jp2"
|
test_file = "Tests/images/rgb_trns_ycbc.jp2"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user