Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
33
def
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
40
def
test_raise_from_already_set(msg):
Callers
nothing calls this directly
Calls
1
msg
Function · 0.85
Tested by
no test coverage detected