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

Function test_raise_from

tests/test_exceptions.py:33–37  ·  view source on GitHub ↗
(msg)

Source from the content-addressed store, hash-verified

31
32
33def test_raise_from(msg):
34 with pytest.raises(ValueError) as excinfo:
35 m.raise_from()
36 assert msg(excinfo.value) == "outer"
37 assert msg(excinfo.value.__cause__) == "inner"
38
39
40def test_raise_from_already_set(msg):

Callers

nothing calls this directly

Calls 1

msgFunction · 0.85

Tested by

no test coverage detected