diff options
author | Fred Drake <fdrake@acm.org> | 2000-08-24 00:35:38 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2000-08-24 00:35:38 (GMT) |
commit | 33438d23faa55e14d09c671dfc71a6355b6a352d (patch) | |
tree | 9b552e7c1d92f5fd91637019d258798dea072f8a | |
parent | ef8ace3a6f6cf8396fa92ae62352e8a29ddfca1d (diff) | |
download | cpython-33438d23faa55e14d09c671dfc71a6355b6a352d.zip cpython-33438d23faa55e14d09c671dfc71a6355b6a352d.tar.gz cpython-33438d23faa55e14d09c671dfc71a6355b6a352d.tar.bz2 |
Charles G. Waldman <cgq@fnal.gov>:
Update the test suite for the changes introduced by the EXTENDED_ARG
opcode.
This closes the regression test changes of SourceForge patch #100893.
-rw-r--r-- | Lib/test/output/test_longexp | 2 | ||||
-rw-r--r-- | Lib/test/test_longexp.py | 20 |
2 files changed, 4 insertions, 18 deletions
diff --git a/Lib/test/output/test_longexp b/Lib/test/output/test_longexp index 392707c..bbdd70c 100644 --- a/Lib/test/output/test_longexp +++ b/Lib/test/output/test_longexp @@ -1,2 +1,2 @@ test_longexp -Caught SyntaxError for long expression: expression too long (line 1) +65580 diff --git a/Lib/test/test_longexp.py b/Lib/test/test_longexp.py index 38eb79b..2d57285 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) |