Reduced JPEG2000 test iterations, and added cleanup for decoding using PyPy

This commit is contained in:
Josh Ware 2014-08-26 22:25:23 +10:00 committed by wiredfool
parent 72e2a6cade
commit 7db19efe75
2 changed files with 3 additions and 1 deletions

View File

@ -227,6 +227,8 @@ class ImageFile(Image.Image):
break
b = b[n:]
t = t + n
# Need to cleanup here to prevent leaks in PyPy
d.cleanup()
self.tile = []
self.readonly = readonly

View File

@ -7,7 +7,7 @@ from PIL import Image
# Limits for testing the leak
mem_limit = 768*1048576
stack_size = 8*1048576
iterations = int((mem_limit/stack_size)*20)
iterations = int((mem_limit/stack_size)*2)
codecs = dir(Image.core)
test_file = "Tests/images/rgb_trns_ycbc.jp2"