Skip to content

Commit d6f9927

Browse files
fangerertimfel
authored andcommitted
Add test for multiple inheritance with native class
1 parent 9d4882b commit d6f9927

File tree

1 file changed

+11
-0
lines changed
  • graalpython/com.oracle.graal.python.test/src/tests/cpyext

1 file changed

+11
-0
lines changed

graalpython/com.oracle.graal.python.test/src/tests/cpyext/test_object.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,17 @@ def test_doc(self):
731731
assert len(obj.some_member.__doc__) == len(expected_doc)
732732
assert obj.some_member.__doc__ == expected_doc
733733

734+
def test_multiple_inheritance_with_native(self):
735+
_A = CPyExtType("_A","")
736+
class B:
737+
def __getattr__(self, name):
738+
return name
739+
class X(_A, B):
740+
b = 2
741+
x = X()
742+
assert x.foo == "foo"
743+
744+
734745
class CBytes:
735746
def __bytes__(self):
736747
return b'abc'

0 commit comments

Comments
 (0)