Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 33438d2

Browse files
committed
Charles G. Waldman <[email protected]>:
Update the test suite for the changes introduced by the EXTENDED_ARG opcode. This closes the regression test changes of SourceForge patch #100893.
1 parent ef8ace3 commit 33438d2

2 files changed

Lines changed: 4 additions & 18 deletions

File tree

Lib/test/output/test_longexp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
test_longexp
2-
Caught SyntaxError for long expression: expression too long (line 1)
2+
65580

Lib/test/test_longexp.py

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,4 @@
1-
REPS = 8192
2-
3-
try:
4-
eval("2+2+" * REPS + "+3.14159265")
5-
except SyntaxError, msg:
6-
print "Caught SyntaxError for long expression:", msg
7-
else:
8-
print "Long expression did not raise SyntaxError"
9-
10-
## This test prints "s_push: parser stack overflow" on stderr,
11-
## which seems to confuse the test harness
12-
##try:
13-
## eval("(2+" * REPS + "0" + ")" * REPS)
14-
##except SyntaxError:
15-
## pass
16-
##else:
17-
## print "Deeply nested expression did not raised SyntaxError"
1+
REPS = 65580
182

3+
l = eval("[" + "2," * REPS + "]")
4+
print len(l)

0 commit comments

Comments
 (0)