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

Function test_multiple_inheritance_mix2

tests/test_multiple_inheritance.py:37–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35
36
37def test_multiple_inheritance_mix2():
38 class Base2:
39 def __init__(self, i):
40 self.i = i
41
42 def bar(self):
43 return self.i
44
45 class MITypePy(m.Base1, Base2):
46 def __init__(self, i, j):
47 m.Base1.__init__(self, i)
48 Base2.__init__(self, j)
49
50 mt = MITypePy(3, 4)
51
52 assert mt.foo() == 3
53 assert mt.bar() == 4
54
55
56@pytest.mark.xfail("env.PYPY")

Callers

nothing calls this directly

Calls 3

MITypePyClass · 0.85
fooMethod · 0.45
barMethod · 0.45

Tested by

no test coverage detected