summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--tests/basics/struct1.py12
-rw-r--r--tests/misc/non_compliant.py7
-rw-r--r--tests/misc/non_compliant.py.exp2
3 files changed, 9 insertions, 12 deletions
diff --git a/tests/basics/struct1.py b/tests/basics/struct1.py
index 1abe34b4c5..b53a9c8bc0 100644
--- a/tests/basics/struct1.py
+++ b/tests/basics/struct1.py
@@ -103,15 +103,3 @@ try:
print(struct.unpack_from('<b', buf, -11))
except:
print('struct.error')
-
-# pack with too many args, not checked by uPy
-#try:
-# print(struct.pack('ii', 1, 2, 3))
-#except:
-# print('struct.error')
-
-# pack with too few args, not checked by uPy
-#try:
-# print(struct.pack('ii', 1))
-#except:
-# print('struct.error')
diff --git a/tests/misc/non_compliant.py b/tests/misc/non_compliant.py
index ba2dd15c6a..1157ff8b29 100644
--- a/tests/misc/non_compliant.py
+++ b/tests/misc/non_compliant.py
@@ -1,6 +1,7 @@
# tests for things that are not implemented, or have non-compliant behaviour
import array
+import ustruct
# array deletion not implemented
try:
@@ -87,3 +88,9 @@ try:
del [][2:3:4]
except NotImplementedError:
print('NotImplementedError')
+
+# struct pack with too many args, not checked by uPy
+print(ustruct.pack('bb', 1, 2, 3))
+
+# struct pack with too few args, not checked by uPy
+print(ustruct.pack('bb', 1))
diff --git a/tests/misc/non_compliant.py.exp b/tests/misc/non_compliant.py.exp
index 5937ccb2fb..c03580442d 100644
--- a/tests/misc/non_compliant.py.exp
+++ b/tests/misc/non_compliant.py.exp
@@ -12,3 +12,5 @@ NotImplementedError
NotImplementedError
NotImplementedError
NotImplementedError
+b'\x01\x02'
+b'\x01\x00'