summaryrefslogtreecommitdiffstatshomepage
path: root/tests
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-01-15 22:14:03 +0000
committerDamien George <damien.p.george@gmail.com>2014-01-15 22:14:03 +0000
commitd02c6d896292d585ba2a46c194cfe00da33a2a72 (patch)
treef8b20e6dee9ffa961120162710b413d265f77152 /tests
parente2fb2baaa48ef6da317a533b5d168b1ab0fcefe8 (diff)
downloadmicropython-d02c6d896292d585ba2a46c194cfe00da33a2a72.tar.gz
micropython-d02c6d896292d585ba2a46c194cfe00da33a2a72.zip
Implement eval.
Diffstat (limited to 'tests')
-rw-r--r--tests/basics/tests/eval1.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/basics/tests/eval1.py b/tests/basics/tests/eval1.py
new file mode 100644
index 0000000000..8b9d02e61b
--- /dev/null
+++ b/tests/basics/tests/eval1.py
@@ -0,0 +1,13 @@
+# builtin eval
+
+eval('1 + 2')
+eval('1 + 2\n')
+eval('1 + 2\n\n#comment\n')
+
+x = 4
+eval('x')
+
+eval('lambda x: x + 10')(-5)
+
+y = 6
+eval('lambda: y * 2')()