aboutsummaryrefslogtreecommitdiff
path: root/tests/extmod/uctypes_byteat.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/extmod/uctypes_byteat.py')
-rw-r--r--tests/extmod/uctypes_byteat.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/extmod/uctypes_byteat.py b/tests/extmod/uctypes_byteat.py
new file mode 100644
index 000000000..ab2535db8
--- /dev/null
+++ b/tests/extmod/uctypes_byteat.py
@@ -0,0 +1,10 @@
+try:
+ import uctypes
+except ImportError:
+ print("SKIP")
+ raise SystemExit
+
+data = bytearray(b'01234567')
+
+print(uctypes.bytes_at(uctypes.addressof(data), 4))
+print(uctypes.bytearray_at(uctypes.addressof(data), 4))