summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/class_item.py
diff options
context:
space:
mode:
authorRami Ali <flowergrass@users.noreply.github.com>2016-11-22 15:49:02 +1100
committerRami Ali <flowergrass@users.noreply.github.com>2016-11-22 15:49:02 +1100
commit2eff9c29a11a9549121c63a702315cfe6c4a711f (patch)
treea61026296ec0f5659dc0cd9c6a685ed62340790a /tests/basics/class_item.py
parent1b41cacac717ca2cb5027626b1521777e0bdcf83 (diff)
downloadmicropython-2eff9c29a11a9549121c63a702315cfe6c4a711f.tar.gz
micropython-2eff9c29a11a9549121c63a702315cfe6c4a711f.zip
tests/basics: Improve user class coverage.
Diffstat (limited to 'tests/basics/class_item.py')
-rw-r--r--tests/basics/class_item.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/basics/class_item.py b/tests/basics/class_item.py
index a96817462f..1d9488bde1 100644
--- a/tests/basics/class_item.py
+++ b/tests/basics/class_item.py
@@ -15,3 +15,12 @@ c = C()
print(c[1])
c[1] = 2
del c[3]
+
+# index not supported
+class A:
+ pass
+a = A()
+try:
+ a[1]
+except TypeError:
+ print('TypeError')