diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-12 18:00:32 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-12 18:00:32 +0100 |
commit | c2803db010ab575e9387e4eaf2f8090b083b3c5f (patch) | |
tree | 3e278d078b421b4c388a0ff1067290d2b775c6c8 /tests/bytecode/mp-tests | |
parent | 0a4c210586e0e5f8de4cf87116edbed9070a4810 (diff) | |
download | micropython-c2803db010ab575e9387e4eaf2f8090b083b3c5f.tar.gz micropython-c2803db010ab575e9387e4eaf2f8090b083b3c5f.zip |
tests: Add some bytecode tests.
Diffstat (limited to 'tests/bytecode/mp-tests')
-rw-r--r-- | tests/bytecode/mp-tests/fun4.py | 5 | ||||
-rw-r--r-- | tests/bytecode/mp-tests/import6.py | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/bytecode/mp-tests/fun4.py b/tests/bytecode/mp-tests/fun4.py new file mode 100644 index 0000000000..b8d2ac159e --- /dev/null +++ b/tests/bytecode/mp-tests/fun4.py @@ -0,0 +1,5 @@ +def f(a, b=1, *c, d): + pass + #print(a,b,c,d) # bug in uPy! +f = lambda a, b, *c, d: None # default arg +#f = lambda a, b=1, *c, d: None # default arg for lambda not implemented diff --git a/tests/bytecode/mp-tests/import6.py b/tests/bytecode/mp-tests/import6.py new file mode 100644 index 0000000000..7cbb3c6d73 --- /dev/null +++ b/tests/bytecode/mp-tests/import6.py @@ -0,0 +1,14 @@ +from . import bar +from .. import bar +from ... import bar +from .... import bar +from ..... import bar +from ...... import bar +from . import bar as abc +from .foo import bar +from ..foo import bar +from ...foo import bar +from .foo.bar import baz +from ..foo.bar import baz +from ...foo.bar import baz +from .foo.bar import baz as abc |