Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
62785201
Commit
62785201
authored
Oct 25, 2014
by
Damien George
Browse files
tests: Add test for compile builtin.
parent
c9fc6207
Changes
1
Show whitespace changes
Inline
Side-by-side
tests/basics/builtin_compile.py
0 → 100644
View file @
62785201
# test compile builtin
try
:
compile
except
NameError
:
print
(
"SKIP"
)
import
sys
sys
.
exit
()
c
=
compile
(
"print(x)"
,
"file"
,
"exec"
)
try
:
exec
(
c
)
except
NameError
:
print
(
"NameError"
)
x
=
1
exec
(
c
)
exec
(
c
,
{
"x"
:
2
})
exec
(
c
,
{},
{
"x"
:
3
})
Write
Preview
Supports
Markdown
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