summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--tests/basics/list1.py6
-rw-r--r--tests/basics/list_mult.py6
-rw-r--r--tests/basics/list_pop.py6
3 files changed, 18 insertions, 0 deletions
diff --git a/tests/basics/list1.py b/tests/basics/list1.py
index c8317baa3d..fa426c0e58 100644
--- a/tests/basics/list1.py
+++ b/tests/basics/list1.py
@@ -22,3 +22,9 @@ print(x)
print(x[1:])
print(x[:-1])
print(x[2:3])
+
+# unsupported type on RHS of add
+try:
+ [] + None
+except TypeError:
+ print('TypeError')
diff --git a/tests/basics/list_mult.py b/tests/basics/list_mult.py
index 16948f74c2..548f88534e 100644
--- a/tests/basics/list_mult.py
+++ b/tests/basics/list_mult.py
@@ -10,3 +10,9 @@ for i in (-4, -2, 0, 2, 4):
a = [1, 2, 3]
c = a * 3
print(a, c)
+
+# unsupported type on RHS
+try:
+ [] * None
+except TypeError:
+ print('TypeError')
diff --git a/tests/basics/list_pop.py b/tests/basics/list_pop.py
index bb2ccc6d67..87ed456f85 100644
--- a/tests/basics/list_pop.py
+++ b/tests/basics/list_pop.py
@@ -9,3 +9,9 @@ except IndexError:
print("IndexError raised")
else:
raise AssertionError("No IndexError raised")
+
+# popping such that list storage shrinks (tests implementation detail of uPy)
+l = list(range(20))
+for i in range(len(l)):
+ l.pop()
+print(l)