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

Function test_timeout

dronekit/test/sitl/test_12.py:14–32  ·  view source on GitHub ↗
(connpath)

Source from the content-addressed store, hash-verified

12
13@with_sitl
14def test_timeout(connpath):
15 v = connect(connpath, wait_ready=True)
16
17 value = v.parameters['THR_MIN']
18 assert_equals(type(value), float)
19
20 start = current_milli_time()
21 v.parameters['THR_MIN'] = value + 10
22 end = current_milli_time()
23
24 newvalue = v.parameters['THR_MIN']
25 assert_equals(type(newvalue), float)
26 assert_equals(newvalue, value + 10)
27
28 # Checks that time to set parameter was <1s
29 # see https://github.com/dronekit/dronekit-python/issues/12
30 assert end - start < 1000, 'time to set parameter was %s, over 1s' % (end - start, )
31
32 v.close()

Callers

nothing calls this directly

Calls 3

connectFunction · 0.90
current_milli_timeFunction · 0.85
closeMethod · 0.45

Tested by

no test coverage detected