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

Function test_smart_ptr_from_default

tests/test_smart_ptr.py:325–331  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

323
324
325def test_smart_ptr_from_default():
326 instance = m.HeldByDefaultHolder()
327 with pytest.raises(RuntimeError) as excinfo:
328 m.HeldByDefaultHolder.load_shared_ptr(instance)
329 assert "Unable to load a custom holder type from a default-holder instance" in str(
330 excinfo.value
331 )
332
333
334def test_shared_ptr_gc():

Callers

nothing calls this directly

Calls 1

strClass · 0.85

Tested by

no test coverage detected