MCPcopy
hub / github.com/dronekit/dronekit-python / test_battery_none

Function test_battery_none

dronekit/test/sitl/test_earlyattrs.py:11–23  ·  view source on GitHub ↗
(connpath)

Source from the content-addressed store, hash-verified

9
10@with_sitl
11def test_battery_none(connpath):
12 vehicle = connect(connpath, _initialize=False)
13
14 # Ensure we can get (possibly unpopulated) battery object without throwing error.
15 assert_equals(vehicle.battery, None)
16
17 vehicle.initialize()
18
19 # Ensure we can get battery object without throwing error.
20 vehicle.wait_ready('battery')
21 assert_not_equals(vehicle.battery, None)
22
23 vehicle.close()

Callers

nothing calls this directly

Calls 4

connectFunction · 0.90
initializeMethod · 0.80
wait_readyMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected