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

Function test_pass_shared_ptr_ptr

tests/test_class_sh_basic.py:235–242  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

233
234
235def test_pass_shared_ptr_ptr():
236 obj = m.atyp()
237 with pytest.raises(RuntimeError) as excinfo:
238 m.pass_shared_ptr_ptr(obj)
239 assert str(excinfo.value) == (
240 "Passing `std::shared_ptr<T> *` from Python to C++ is not supported"
241 " (inherently unsafe)."
242 )
243
244
245def test_unusual_op_ref():

Callers

nothing calls this directly

Calls 2

strClass · 0.85
atypMethod · 0.80

Tested by

no test coverage detected