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

Function test_native_enum_name_clash

tests/test_native_enum.py:275–283  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

273
274
275def test_native_enum_name_clash():
276 m.fake_native_enum_name_clash = None
277 with pytest.raises(RuntimeError) as excinfo:
278 m.native_enum_name_clash(m)
279 assert (
280 str(excinfo.value)
281 == 'pybind11::native_enum<...>("fake_native_enum_name_clash"):'
282 " an object with that name is already defined"
283 )
284
285
286def test_native_enum_value_name_clash():

Callers

nothing calls this directly

Calls 1

strClass · 0.85

Tested by

no test coverage detected