Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
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
Boxiang Sun
Pyston
Commits
b77a9155
Commit
b77a9155
authored
Apr 22, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test cases
parent
db67a4ab
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
0 deletions
+58
-0
Makefile
Makefile
+3
-0
test/tests/compile_exec.py
test/tests/compile_exec.py
+28
-0
test/tests/compile_future.py
test/tests/compile_future.py
+8
-0
test/tests/exec_func_code.py
test/tests/exec_func_code.py
+19
-0
No files found.
Makefile
View file @
b77a9155
...
...
@@ -1023,8 +1023,11 @@ $(call make_target,_gcc)
nosearch_runpy_% nosearch_pyrun_%
:
%.py ext_python
$(VERB)
PYTHONPATH
=
test
/test_extension/build/lib.linux-x86_64-2.7 zsh
-c
'time python $<'
nosearch_pypyrun_%
:
%.py ext_python
$(VERB)
PYTHONPATH
=
test
/test_extension/build/lib.linux-x86_64-2.7 zsh
-c
'time python $<'
$(call
make_search,runpy_%)
$(call
make_search,pyrun_%)
$(call
make_search,pypyrun_%)
nosearch_check_%
:
%.py ext_python ext_pyston
$(MAKE)
check_dbg
ARGS
=
"
$(
patsubst
%.py,%,
$(
notdir
$<
))
-K"
...
...
test/tests/compile_exec.py
0 → 100644
View file @
b77a9155
c
=
compile
(
"a = 1; print a"
,
"test.py"
,
"exec"
)
print
type
(
c
)
print
a
=
0
exec
c
print
a
print
a
=
0
g
=
{}
exec
c
in
g
print
a
,
sorted
(
g
.
keys
())
print
g
=
{}
exec
"""
c = compile("a = 1; print a", "test.py", "exec")
"""
in
g
a
=
0
exec
g
[
'c'
]
print
a
,
sorted
(
g
.
keys
())
print
a
=
0
g
=
{
'_c'
:
c
}
exec
"exec _c"
in
g
print
a
,
sorted
(
g
.
keys
())
test/tests/compile_future.py
0 → 100644
View file @
b77a9155
from
__future__
import
division
# compile() inherits the future flags of the parent module
print
1
/
2
exec
"print 1 / 2"
exec
compile
(
"print 1 / 2"
,
"<string>"
,
"exec"
)
# But you can explicitly request that they not be inherited:
exec
compile
(
"print 1 / 2"
,
"<string>"
,
"exec"
,
flags
=
0
,
dont_inherit
=
True
)
test/tests/exec_func_code.py
0 → 100644
View file @
b77a9155
# expected: fail
# - not currently supported
def
f
():
global
b
b
=
1
print
b
print
b
=
0
g
=
{}
exec
f
.
func_code
in
g
print
b
,
sorted
(
g
.
keys
())
print
b
=
0
g
=
{
'f'
:
f
}
exec
"f()"
in
g
print
b
,
sorted
(
g
.
keys
())
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