summaryrefslogtreecommitdiff
path: root/tests/basics/struct_micropython.py
diff options
context:
space:
mode:
authorGlenn Ruben Bakke <glennbakke@gmail.com>2017-10-04 21:45:04 +0200
committerGlenn Ruben Bakke <glennbakke@gmail.com>2017-10-04 21:45:04 +0200
commitbcab2ba0a80297100919366add6bada140c6ed75 (patch)
tree5133218f4fc010d5688f006dbdd1e2f346a843f7 /tests/basics/struct_micropython.py
parent4468731e3d039a3f72ac25aa43e936cf5ebb3f78 (diff)
parentf869d6b2e339c04469c6c9ea3fb2fabd7bbb2d8c (diff)
ports/nrf: Upmerging port with upstream master
Diffstat (limited to 'tests/basics/struct_micropython.py')
-rw-r--r--tests/basics/struct_micropython.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/basics/struct_micropython.py b/tests/basics/struct_micropython.py
index 4b9dfe137..f203a4666 100644
--- a/tests/basics/struct_micropython.py
+++ b/tests/basics/struct_micropython.py
@@ -18,6 +18,9 @@ s = struct.pack("<O", o)
o2 = struct.unpack("<O", s)
print(o is o2[0])
+# pack can accept less arguments than required for the format spec
+print(struct.pack('<2I', 1))
+
# pack and unpack pointer to a string
# This requires uctypes to get the address of the string and instead of
# putting this in a dedicated test that can be skipped we simply pass