summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/class_super_multinherit.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-12-14 12:25:30 +1100
committerDamien George <damien.p.george@gmail.com>2017-12-14 12:25:30 +1100
commit36f79523abe8d79fec1cc7af41e8e96e8ceb2cc4 (patch)
treea0dff868ffdc95cd973c46e5a1fa9b79aecd00a0 /tests/basics/class_super_multinherit.py
parentbadaf3ecfe5d0c8158debf4bd0cb1458016c77f4 (diff)
downloadmicropython-36f79523abe8d79fec1cc7af41e8e96e8ceb2cc4.tar.gz
micropython-36f79523abe8d79fec1cc7af41e8e96e8ceb2cc4.zip
tests: Add tests to improve coverage of py/objtype.c.
Diffstat (limited to 'tests/basics/class_super_multinherit.py')
-rw-r--r--tests/basics/class_super_multinherit.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/basics/class_super_multinherit.py b/tests/basics/class_super_multinherit.py
new file mode 100644
index 0000000000..642a73ce1a
--- /dev/null
+++ b/tests/basics/class_super_multinherit.py
@@ -0,0 +1,16 @@
+# test super with multiple inheritance
+
+class A:
+ def foo(self):
+ print('A.foo')
+
+class B:
+ def foo(self):
+ print('B.foo')
+
+class C(A, B):
+ def foo(self):
+ print('C.foo')
+ super().foo()
+
+C().foo()