diff options
Diffstat (limited to 'Lib/test/test_longexp.py')
-rw-r--r-- | Lib/test/test_longexp.py | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/Lib/test/test_longexp.py b/Lib/test/test_longexp.py index 38eb79b1c8..2d57285df5 100644 --- a/Lib/test/test_longexp.py +++ b/Lib/test/test_longexp.py @@ -1,18 +1,4 @@ -REPS = 8192 - -try: - eval("2+2+" * REPS + "+3.14159265") -except SyntaxError, msg: - print "Caught SyntaxError for long expression:", msg -else: - print "Long expression did not raise SyntaxError" - -## This test prints "s_push: parser stack overflow" on stderr, - ## which seems to confuse the test harness -##try: -## eval("(2+" * REPS + "0" + ")" * REPS) -##except SyntaxError: -## pass -##else: -## print "Deeply nested expression did not raised SyntaxError" +REPS = 65580 +l = eval("[" + "2," * REPS + "]") +print len(l) |