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

Function test_with_alias_invalid

tests/test_class_sh_factory_constructors.py:42–53  ·  view source on GitHub ↗
(num_init_args, smart_ptr)

Source from the content-addressed store, hash-verified

40 ],
41)
42def test_with_alias_invalid(num_init_args, smart_ptr):
43 class PyDrvdWithAlias(m.with_alias):
44 pass
45
46 with pytest.raises(TypeError) as excinfo:
47 PyDrvdWithAlias(*((0,) * num_init_args))
48 assert (
49 str(excinfo.value)
50 == "pybind11::init(): construction failed: returned "
51 + smart_ptr
52 + " pointee is not an alias instance"
53 )

Callers

nothing calls this directly

Calls 2

PyDrvdWithAliasClass · 0.85
strClass · 0.85

Tested by

no test coverage detected