@pytest.mark.parametrize(u'testframe', totest_frames)
def test_gcrs_altaz_bothroutes(testframe):
 sun = get_sun(testframe.obstime)
 sunaa_viaicrs = sun.transform_to(ICRS).transform_to(testframe)
 sunaa_viaitrs = sun.transform_to(ITRS(obstime=testframe.obstime)).transform_to(testframe)
 moon = GCRS(MOONDIST_CART, obstime=testframe.obstime)
 moonaa_viaicrs = moon.transform_to(ICRS).transform_to(testframe)
 moonaa_viaitrs = moon.transform_to(ITRS(obstime=testframe.obstime)).transform_to(testframe)
 assert_allclose(sunaa_viaicrs.cartesian.xyz, sunaa_viaitrs.cartesian.xyz)
 assert_allclose(moonaa_viaicrs.cartesian.xyz, moonaa_viaitrs.cartesian.xyz)

@ pytest . mark . parametrize ( u'testframe' , totest_frames ) def test_gcrs_altaz_bothroutes ( testframe ) : sun = get_sun ( testframe . obstime ) sunaa_viaicrs = sun . transform_to ( ICRS ) . transform_to ( testframe ) sunaa_viaitrs = sun . transform_to ( ITRS ( obstime = testframe . obstime ) ) . transform_to ( testframe ) moon = GCRS ( MOONDIST_CART , obstime = testframe . obstime ) moonaa_viaicrs = moon . transform_to ( ICRS ) . transform_to ( testframe ) moonaa_viaitrs = moon . transform_to ( ITRS ( obstime = testframe . obstime ) ) . transform_to ( testframe ) assert_allclose ( sunaa_viaicrs . cartesian . xyz , sunaa_viaitrs . cartesian . xyz ) assert_allclose ( moonaa_viaicrs . cartesian . xyz , moonaa_viaitrs . cartesian . xyz )
repeat of both the moonish and sunish tests above to make sure the two routes through the coordinate graph are consistent with each other .