def test_getting_started():
 from .. import imperial
 with imperial.enable():
  speed_unit = (u.cm / u.s)
  x = speed_unit.to((imperial.mile / u.hour), 1)
  assert_allclose(x, 0.02236936292054402)
  speed_converter = speed_unit._get_converter(u'mile hour^-1')
  x = speed_converter([1.0, 1000.0, 5000.0])
  assert_allclose(x, [0.0223693629, 22.3693629, 111.846815])

def test_getting_started ( ) : from . . import imperial with imperial . enable ( ) : speed_unit = ( u . cm / u . s ) x = speed_unit . to ( ( imperial . mile / u . hour ) , 1 ) assert_allclose ( x , 0.02236936292054402 ) speed_converter = speed_unit . _get_converter ( u'mile hour^-1' ) x = speed_converter ( [ 1.0 , 1000.0 , 5000.0 ] ) assert_allclose ( x , [ 0.0223693629 , 22.3693629 , 111.846815 ] )
corresponds to "getting started" section in the docs .