def test_regression_5209():
 time = Time(u'2015-01-01')
 moon = get_moon(time)
 new_coord = SkyCoord([moon])
 assert_quantity_allclose(new_coord[0].distance, moon.distance)

def test_regression_5209 ( ) : time = Time ( u'2015-01-01' ) moon = get_moon ( time ) new_coord = SkyCoord ( [ moon ] ) assert_quantity_allclose ( new_coord [ 0 ] . distance , moon . distance )
check that distances are not lost on skycoord init .