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

Function test_throw_nested_exception

tests/test_exceptions.py:261–265  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

259 reason="Started segfaulting February 2024",
260)
261def test_throw_nested_exception():
262 with pytest.raises(RuntimeError) as excinfo:
263 m.throw_nested_exception()
264 assert str(excinfo.value) == "Outer Exception"
265 assert str(excinfo.value.__cause__) == "Inner Exception"
266
267
268# This can often happen if you wrap a pybind11 class in a Python wrapper

Callers

nothing calls this directly

Calls 1

strClass · 0.85

Tested by

no test coverage detected