Function
test_pass_unique_ptr_disowns
(pass_f, rtrn_f, expected)
Source from the content-addressed store, hash-verified
| 106 | ], |
| 107 | ) |
| 108 | def test_pass_unique_ptr_disowns(pass_f, rtrn_f, expected): |
| 109 | obj = rtrn_f() |
| 110 | assert pass_f(obj) == expected |
| 111 | with pytest.raises(ValueError) as exc_info: |
| 112 | pass_f(obj) |
| 113 | assert str(exc_info.value) == ( |
| 114 | "Missing value for wrapped C++ type" |
| 115 | " `pybind11_tests::class_sh_basic::atyp`:" |
| 116 | " Python instance was disowned." |
| 117 | ) |
| 118 | |
| 119 | |
| 120 | @pytest.mark.parametrize( |
Callers
nothing calls this directly
Tested by
no test coverage detected