diff options
| author | Damien George | 2014-04-10 12:58:31 +0100 |
|---|---|---|
| committer | Damien George | 2014-04-10 12:58:31 +0100 |
| commit | 3a8b1607fcbffdbff0a0001d6baacea7693d15b9 (patch) | |
| tree | 359d2b30a91c4ffc37ce2ce2734abfa6331d6dd3 /tests/basics | |
| parent | 635543c72cc9ccfb20c1ec1f64d329eef35ebe2d (diff) | |
| parent | 978607aeffb5b1deca3a4ad4b0ab0d0e15b5e271 (diff) | |
Merge branch 'master' of github.com:micropython/micropython
Diffstat (limited to 'tests/basics')
| -rw-r--r-- | tests/basics/fun-defargs2.py | 6 | ||||
| -rw-r--r-- | tests/basics/struct1.py | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/basics/fun-defargs2.py b/tests/basics/fun-defargs2.py index c9090a3cd..8b72ed8b1 100644 --- a/tests/basics/fun-defargs2.py +++ b/tests/basics/fun-defargs2.py @@ -11,3 +11,9 @@ foo(1, b=333) # override with keyword foo(a=2, b=333) + +def foo2(a=1, b=2): + print(a, b) + +# default and keyword +foo2(b='two') diff --git a/tests/basics/struct1.py b/tests/basics/struct1.py new file mode 100644 index 000000000..6feaca384 --- /dev/null +++ b/tests/basics/struct1.py @@ -0,0 +1,3 @@ +import struct +print(struct.calcsize("<bI")) +print(struct.unpack("<bI", b"\x80\0\0\x01\0")) |
