summaryrefslogtreecommitdiffstatshomepage
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/extmod/machine1.py20
-rw-r--r--tests/extmod/machine1.py.exp4
2 files changed, 24 insertions, 0 deletions
diff --git a/tests/extmod/machine1.py b/tests/extmod/machine1.py
index 6ff38cc051..0c7f8122f4 100644
--- a/tests/extmod/machine1.py
+++ b/tests/extmod/machine1.py
@@ -26,3 +26,23 @@ try:
del machine.mem8[0]
except TypeError:
print("TypeError")
+
+try:
+ machine.mem8[0:1]
+except TypeError:
+ print("TypeError")
+
+try:
+ machine.mem8[0:1] = 10
+except TypeError:
+ print("TypeError")
+
+try:
+ machine.mem8["hello"]
+except TypeError:
+ print("TypeError")
+
+try:
+ machine.mem8["hello"] = 10
+except TypeError:
+ print("TypeError")
diff --git a/tests/extmod/machine1.py.exp b/tests/extmod/machine1.py.exp
index bb421ea5cf..2504859690 100644
--- a/tests/extmod/machine1.py.exp
+++ b/tests/extmod/machine1.py.exp
@@ -2,3 +2,7 @@
ValueError
ValueError
TypeError
+TypeError
+TypeError
+TypeError
+TypeError