Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
6ab080cd
Commit
6ab080cd
authored
Oct 24, 2005
by
Neal Norwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix problem handling EXTENDED_ARGs from SF bug # 1333982
parent
f8950654
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
Lib/test/test_compile.py
Lib/test/test_compile.py
+23
-0
No files found.
Lib/test/test_compile.py
View file @
6ab080cd
...
...
@@ -101,6 +101,29 @@ class TestSpecifics(unittest.TestCase):
exec
'z = a'
in
g
,
d
self
.
assertEqual
(
d
[
'z'
],
12
)
def
test_extended_arg
(
self
):
longexpr
=
'x = x or '
+
'-x'
*
2500
code
=
'''
def f(x):
%s
%s
%s
%s
%s
%s
%s
%s
%s
%s
# the expressions above have no effect, x == argument
while x:
x -= 1
# EXTENDED_ARG/JUMP_ABSOLUTE here
return x
'''
%
((
longexpr
,)
*
10
)
exec
code
self
.
assertEqual
(
f
(
5
),
0
)
def
test_complex_args
(
self
):
def
comp_args
((
a
,
b
)):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment