summaryrefslogtreecommitdiffstatshomepage
path: root/tests
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-04-17 18:58:46 +0100
committerDamien George <damien.p.george@gmail.com>2014-04-17 18:58:46 +0100
commitd89b69eb3a8c53e0026e9dfffb1fa5d8da5569f7 (patch)
treeb33203dec0dba5294f3ee754e7c495c999978631 /tests
parentd0f9f6cd3f4b541dd4324dd73371638185178cdb (diff)
parente1e4249a674397ab837a31b8b4821f64e655c74e (diff)
downloadmicropython-d89b69eb3a8c53e0026e9dfffb1fa5d8da5569f7.tar.gz
micropython-d89b69eb3a8c53e0026e9dfffb1fa5d8da5569f7.zip
Merge branch 'master' of github.com:micropython/micropython
Diffstat (limited to 'tests')
-rw-r--r--tests/basics/gen_context.py9
-rw-r--r--tests/basics/gen_context2.py2
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/basics/gen_context.py b/tests/basics/gen_context.py
new file mode 100644
index 0000000000..02f1531467
--- /dev/null
+++ b/tests/basics/gen_context.py
@@ -0,0 +1,9 @@
+import gen_context2
+
+GLOBAL = "GLOBAL"
+
+def gen():
+ print(GLOBAL)
+ yield 1
+
+gen_context2.call(gen())
diff --git a/tests/basics/gen_context2.py b/tests/basics/gen_context2.py
new file mode 100644
index 0000000000..0d8048afcc
--- /dev/null
+++ b/tests/basics/gen_context2.py
@@ -0,0 +1,2 @@
+def call(g):
+ next(g)