<s> import time <EOL> import sys <EOL> import os <EOL> import socket <EOL> from dronekit import connect , VehicleMode <EOL> from dronekit . test import with_sitl <EOL> from nose . tools import assert_equals , assert_not_equals <EOL> @ with_sitl <EOL> def test_battery_none ( connpath ) : <EOL> vehicle = connect ( connpath , _initialize = False ) <EOL> assert_equals ( vehicle . battery , None ) <EOL> vehicle . initialize ( ) <EOL> vehicle . wait_ready ( '<STR_LIT>' ) <EOL> assert_not_equals ( vehicle . battery , None ) <EOL> vehicle . close ( ) </s>
