def test_distance_in_coordinates():
 ra = Longitude(u'4:08:15.162342', unit=u.hour)
 dec = Latitude(u'-41:08:15.162342', unit=u.degree)
 coo = ICRS(ra, dec, distance=(2 * u.kpc))
 cart = coo.cartesian
 assert isinstance(cart.xyz, u.Quantity)

def test_distance_in_coordinates ( ) : ra = Longitude ( u'4:08:15.162342' , unit = u . hour ) dec = Latitude ( u'-41:08:15.162342' , unit = u . degree ) coo = ICRS ( ra , dec , distance = ( 2 * u . kpc ) ) cart = coo . cartesian assert isinstance ( cart . xyz , u . Quantity )
test that distances can be created from quantities and that cartesian representations come out right .