Added a check for PyPy, as it needs far more memory as CPython

This commit is contained in:
Josh Ware 2014-08-26 14:44:09 +10:00 committed by wiredfool
parent dea36ae610
commit a1f66bf402

View File

@ -1,10 +1,13 @@
from helper import unittest, PillowTestCase, tearDownModule from helper import unittest, PillowTestCase, tearDownModule
import sys import sys
from platform import python_implementation
from PIL import Image from PIL import Image
# Limits for testing the leak # Limits for testing the leak
mem_limit = 2048*1048576 mem_limit = 1024*1048576
if python_implementation() == "PyPy":
mem_limit = 4096*1048576
stack_size = 8*1048576 stack_size = 8*1048576
iterations = int(mem_limit/stack_size)*2 iterations = int(mem_limit/stack_size)*2
codecs = dir(Image.core) codecs = dir(Image.core)