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

Function test_reentrant_implicit_conversion_failure

tests/test_class.py:431–443  ·  view source on GitHub ↗
(msg)

Source from the content-addressed store, hash-verified

429
430
431def test_reentrant_implicit_conversion_failure(msg):
432 # ensure that there is no runaway reentrant implicit conversion (#1035)
433 with pytest.raises(TypeError) as excinfo:
434 m.BogusImplicitConversion(0)
435 assert (
436 msg(excinfo.value)
437 == """
438 __init__(): incompatible constructor arguments. The following argument types are supported:
439 1. m.class_.BogusImplicitConversion(arg0: m.class_.BogusImplicitConversion)
440
441 Invoked with: 0
442 """
443 )
444
445
446def test_error_after_conversions():

Callers

nothing calls this directly

Calls 2

msgFunction · 0.85

Tested by

no test coverage detected