()
| 323 | |
| 324 | |
| 325 | def 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 | |
| 334 | def test_shared_ptr_gc(): |