tests: Add tests to improve coverage of py/objtype.c.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
# test multiple inheritance of user classes
|
||||
|
||||
class A:
|
||||
def __init__(self, x):
|
||||
print('A init', x)
|
||||
@@ -30,6 +32,9 @@ class Sub(A, B):
|
||||
def g(self):
|
||||
print(self.x)
|
||||
|
||||
print(issubclass(Sub, A))
|
||||
print(issubclass(Sub, B))
|
||||
|
||||
o = Sub()
|
||||
print(o.x)
|
||||
o.f()
|
||||
|
||||
Reference in New Issue
Block a user