def test_getitem_representation():
 sc = SkyCoord(([1, 1] * u.deg), ([2, 2] * u.deg))
 sc.representation = u'cartesian'
 assert (sc[0].representation is CartesianRepresentation)

def test_getitem_representation ( ) : sc = SkyCoord ( ( [ 1 , 1 ] * u . deg ) , ( [ 2 , 2 ] * u . deg ) ) sc . representation = u'cartesian' assert ( sc [ 0 ] . representation is CartesianRepresentation )
make sure current representation survives __getitem__ even if different from data representation .