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

Method dispatch

tests/test_virtual_functions.py:253–261  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

251
252 class PyClass2(m.DispatchIssue):
253 def dispatch(self):
254 with pytest.raises(RuntimeError) as excinfo:
255 super().dispatch()
256 assert (
257 msg(excinfo.value)
258 == 'Tried to call pure virtual function "Base::dispatch"'
259 )
260
261 return m.dispatch_issue_go(PyClass1())
262
263 b = PyClass2()
264 assert m.dispatch_issue_go(b) == "Yay.."

Callers

nothing calls this directly

Calls 3

msgFunction · 0.85
PyClass1Class · 0.85
dispatchMethod · 0.45

Tested by

no test coverage detected