MCPcopy Create free account
hub / github.com/pybind/pybind11 / test_multiple_inheritance_mix1

Function test_multiple_inheritance_mix1

tests/test_multiple_inheritance.py:18–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16
17@pytest.mark.xfail("env.PYPY")
18def test_multiple_inheritance_mix1():
19 class Base1:
20 def __init__(self, i):
21 self.i = i
22
23 def foo(self):
24 return self.i
25
26 class MITypePy(Base1, m.Base2):
27 def __init__(self, i, j):
28 Base1.__init__(self, i)
29 m.Base2.__init__(self, j)
30
31 mt = MITypePy(3, 4)
32
33 assert mt.foo() == 3
34 assert mt.bar() == 4
35
36
37def test_multiple_inheritance_mix2():

Callers

nothing calls this directly

Calls 3

MITypePyClass · 0.85
fooMethod · 0.45
barMethod · 0.45

Tested by

no test coverage detected