summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/basics/fun-defargs2.py6
-rw-r--r--tests/basics/struct1.py3
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"))