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

Function test_altitude_binding

tests/test_native_enum.py:339–344  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

337 assert m.altitude[name].value == value
338
339 def test_altitude_binding():
340 assert m.is_high_altitude(m.altitude.high)
341 assert not m.is_high_altitude(m.altitude.low)
342 assert m.get_altitude() is m.altitude.high
343 with pytest.raises(TypeError, match="incompatible function arguments"):
344 m.is_high_altitude("oops")
345
346 m.bind_altitude(m)
347 test_altitude_enum()

Calls

no outgoing calls

Tested by

no test coverage detected