()
| 166 | |
| 167 | |
| 168 | def test_unique_ptr_cref_roundtrip(): |
| 169 | # Multiple roundtrips to stress-test implementation. |
| 170 | num_round_trips = 1000 |
| 171 | orig = m.atyp("passenger") |
| 172 | mtxt_orig = m.get_mtxt(orig) |
| 173 | recycled = orig |
| 174 | for _ in range(num_round_trips): |
| 175 | recycled = m.unique_ptr_cref_roundtrip(recycled) |
| 176 | assert recycled is orig |
| 177 | assert m.get_mtxt(recycled) == mtxt_orig |
| 178 | |
| 179 | |
| 180 | @pytest.mark.parametrize( |