()
| 267 | |
| 268 | # This can often happen if you wrap a pybind11 class in a Python wrapper |
| 269 | def test_invalid_repr(): |
| 270 | class MyRepr: |
| 271 | def __repr__(self): |
| 272 | raise AttributeError("Example error") |
| 273 | |
| 274 | with pytest.raises(TypeError): |
| 275 | m.simple_bool_passthrough(MyRepr()) |
| 276 | |
| 277 | |
| 278 | def test_local_translator(msg): |