diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-17 18:58:46 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-17 18:58:46 +0100 |
commit | d89b69eb3a8c53e0026e9dfffb1fa5d8da5569f7 (patch) | |
tree | b33203dec0dba5294f3ee754e7c495c999978631 /tests | |
parent | d0f9f6cd3f4b541dd4324dd73371638185178cdb (diff) | |
parent | e1e4249a674397ab837a31b8b4821f64e655c74e (diff) | |
download | micropython-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.py | 9 | ||||
-rw-r--r-- | tests/basics/gen_context2.py | 2 |
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) |