summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/exec1.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-02-12 23:02:49 +0000
committerDamien George <damien.p.george@gmail.com>2014-02-12 23:02:49 +0000
commita8d404e0e1cfc3ad1fb171b5515f2685af4ffeca (patch)
tree59cb5ce2c2498b9f3aa19927eb513221b3622af3 /tests/basics/exec1.py
parent099a9cb575b254dd9e00fd1c60859aec7299deb7 (diff)
parent2aa217b97473932e1b49b5332942f4aaf74e7a34 (diff)
downloadmicropython-a8d404e0e1cfc3ad1fb171b5515f2685af4ffeca.tar.gz
micropython-a8d404e0e1cfc3ad1fb171b5515f2685af4ffeca.zip
Merge branch 'master' of github.com:micropython/micropython
Diffstat (limited to 'tests/basics/exec1.py')
-rw-r--r--tests/basics/exec1.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/basics/exec1.py b/tests/basics/exec1.py
new file mode 100644
index 0000000000..59de5d69a2
--- /dev/null
+++ b/tests/basics/exec1.py
@@ -0,0 +1,6 @@
+print(exec("def foo(): return 42"))
+print(foo())
+
+d = {}
+exec("def bar(): return 84", d)
+print(d["bar"]())