summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/extmod/uctypes_32bit_intbig.py4
-rw-r--r--tests/extmod/uctypes_32bit_intbig.py.exp20
2 files changed, 12 insertions, 12 deletions
diff --git a/tests/extmod/uctypes_32bit_intbig.py b/tests/extmod/uctypes_32bit_intbig.py
index eed36e877..27d33817c 100644
--- a/tests/extmod/uctypes_32bit_intbig.py
+++ b/tests/extmod/uctypes_32bit_intbig.py
@@ -6,7 +6,7 @@ except ImportError:
print("SKIP")
raise SystemExit
-buf = b"12345678abcd"
+buf = bytearray(b"12345678abcd")
struct = uctypes.struct(
uctypes.addressof(buf),
{"f32": uctypes.UINT32 | 0, "f64": uctypes.UINT64 | 4},
@@ -30,7 +30,7 @@ print(buf)
print("=")
-buf = b"12345678abcd"
+buf = bytearray(b"12345678abcd")
struct = uctypes.struct(
uctypes.addressof(buf),
{"f32": uctypes.UINT32 | 0, "f64": uctypes.UINT64 | 4},
diff --git a/tests/extmod/uctypes_32bit_intbig.py.exp b/tests/extmod/uctypes_32bit_intbig.py.exp
index d1fc1fe35..1b16ddbc3 100644
--- a/tests/extmod/uctypes_32bit_intbig.py.exp
+++ b/tests/extmod/uctypes_32bit_intbig.py.exp
@@ -1,11 +1,11 @@
-b'\xff\xff\xff\x7f5678abcd'
-b'\x00\x00\x00\x805678abcd'
-b'\x03\x02\x01\xff5678abcd'
-b'\x03\x02\x01\xff\x00\x00\x00\x80\x00\x00\x00\x00'
-b'\x03\x02\x01\xff\x00\x00\x00\x00\x01\x00\x00\x00'
+bytearray(b'\xff\xff\xff\x7f5678abcd')
+bytearray(b'\x00\x00\x00\x805678abcd')
+bytearray(b'\x03\x02\x01\xff5678abcd')
+bytearray(b'\x03\x02\x01\xff\x00\x00\x00\x80\x00\x00\x00\x00')
+bytearray(b'\x03\x02\x01\xff\x00\x00\x00\x00\x01\x00\x00\x00')
=
-b'\x7f\xff\xff\xff5678abcd'
-b'\x80\x00\x00\x005678abcd'
-b'\xff\x01\x02\x035678abcd'
-b'\xff\x01\x02\x03\x00\x00\x00\x00\x80\x00\x00\x00'
-b'\xff\x01\x02\x03\x00\x00\x00\x01\x00\x00\x00\x00'
+bytearray(b'\x7f\xff\xff\xff5678abcd')
+bytearray(b'\x80\x00\x00\x005678abcd')
+bytearray(b'\xff\x01\x02\x035678abcd')
+bytearray(b'\xff\x01\x02\x03\x00\x00\x00\x00\x80\x00\x00\x00')
+bytearray(b'\xff\x01\x02\x03\x00\x00\x00\x01\x00\x00\x00\x00')