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

Function TEST_SUBMODULE

tests/test_python_multiple_inheritance.cpp:31–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29} // namespace test_python_multiple_inheritance
30
31TEST_SUBMODULE(python_multiple_inheritance, m) {
32 using namespace test_python_multiple_inheritance;
33
34 py::class_<CppBase>(m, "CppBase")
35 .def(py::init<int>())
36 .def("get_base_value", &CppBase::get_base_value)
37 .def("reset_base_value", &CppBase::reset_base_value);
38
39 py::class_<CppDrvd, CppBase>(m, "CppDrvd")
40 .def(py::init<int>())
41 .def("get_drvd_value", &CppDrvd::get_drvd_value)
42 .def("reset_drvd_value", &CppDrvd::reset_drvd_value)
43 .def("get_base_value_from_drvd", &CppDrvd::get_base_value_from_drvd)
44 .def("reset_base_value_from_drvd", &CppDrvd::reset_base_value_from_drvd);
45}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected