Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pybind/pybind11
/ test_std_exception
Function
test_std_exception
tests/test_exceptions.py:14–17 ·
view source on GitHub ↗
(msg)
Source
from the content-addressed store, hash-verified
12
13
14
def
test_std_exception(msg):
15
with
pytest.raises(RuntimeError)
as
excinfo:
16
m.throw_std_exception()
17
assert msg(excinfo.value) ==
"This exception was intentionally thrown."
18
19
20
def
test_error_already_set(msg):
Callers
nothing calls this directly
Calls
1
msg
Function · 0.85
Tested by
no test coverage detected