[Python-checkins] CVS: python/dist/src/Lib/test test_longexp.py,NONE,1.1
Jeremy Hylton
python-dev@python.org
Tue, 20 Jun 2000 12:13:30 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory slayer.i.sourceforge.net:/tmp/cvs-serv656
Added Files:
test_longexp.py
Log Message:
verify that Python raises SyntaxError for long and deeply-nested expressions
--- NEW FILE ---
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"