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

Class MyRepr

tests/test_exceptions.py:270–272  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268# This can often happen if you wrap a pybind11 class in a Python wrapper
269def 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())

Callers 1

test_invalid_reprFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_invalid_reprFunction · 0.68