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

Function require_implicit

tests/test_builtin_casters.py:368–369  ·  view source on GitHub ↗
(v)

Source from the content-addressed store, hash-verified

366 convert, noconvert = m.int_passthrough, m.int_passthrough_noconvert
367
368 def require_implicit(v):
369 pytest.raises(TypeError, noconvert, v)
370
371 # `np.intc` is an alias that corresponds to a C++ `int`
372 assert convert(np.intc(42)) == 42

Callers 2

test_numpy_int_convertFunction · 0.85
test_bool_casterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected