From c2803db010ab575e9387e4eaf2f8090b083b3c5f Mon Sep 17 00:00:00 2001 From: Damien George Date: Sat, 12 Apr 2014 18:00:32 +0100 Subject: [PATCH] tests: Add some bytecode tests. --- tests/bytecode/mp-tests/fun4.py | 5 +++++ tests/bytecode/mp-tests/import6.py | 14 ++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 tests/bytecode/mp-tests/fun4.py create mode 100644 tests/bytecode/mp-tests/import6.py 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