MCPcopy Index your code
hub / github.com/dronekit/dronekit-python / test_location_notify

Function test_location_notify

dronekit/test/sitl/test_locations.py:73–85  ·  view source on GitHub ↗
(connpath)

Source from the content-addressed store, hash-verified

71
72@with_sitl
73def test_location_notify(connpath):
74 vehicle = connect(connpath)
75
76 ret = {'success': False}
77
78 @vehicle.location.on_attribute('global_frame')
79 def callback(*args):
80 assert_not_equals(args[2].alt, 0)
81 ret['success'] = True
82
83 wait_for(lambda : ret['success'], 30)
84
85 assert ret['success'], 'Expected location object to emit notifications.'

Callers

nothing calls this directly

Calls 2

connectFunction · 0.90
wait_forFunction · 0.90

Tested by

no test coverage detected