summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_longexp.py
blob: b7842f99b65e29e8fc07946dfb6fd5a5f8bb9332 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# 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':
    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)