cpython/Lib/test/test_longexp.py

17 lines
494 B
Python
Raw Normal View History

# this test has a malloc problem on OS/2+EMX, so skip test in that environment
import sys
from test_support import TestFailed, TestSkipped
REPS = 65580
if sys.platform == 'mac':
2002-04-15 22:38:40 -03:00
import gestalt
if gestalt.gestalt('sysv') > 0x9ff:
raise TestSkipped, 'Triggers pathological malloc slowdown on OSX MacPython'
if sys.platform == "os2emx":
raise TestFailed, "OS/2+EMX port has malloc problems with long expressions"
else:
l = eval("[" + "2," * REPS + "]")
print len(l)