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

Function test_native_enum_value_name_clash

tests/test_native_enum.py:286–295  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

284
285
286def test_native_enum_value_name_clash():
287 m.fake_native_enum_value_name_clash_x = None
288 with pytest.raises(RuntimeError) as excinfo:
289 m.native_enum_value_name_clash(m)
290 assert (
291 str(excinfo.value)
292 == 'pybind11::native_enum<...>("fake_native_enum_value_name_clash")'
293 '.value("fake_native_enum_value_name_clash_x"):'
294 " an object with that name is already defined"
295 )
296
297
298def test_double_registration_enum_before_native_enum():

Callers

nothing calls this directly

Calls 1

strClass · 0.85

Tested by

no test coverage detected