@pytest.mark.parametrize(u'rotation, expectedlatlon', [((0 * u.deg), ([0, 1] * u.deg)), ((180 * u.deg), ([0, (-1)] * u.deg)), ((90 * u.deg), ([(-1), 0] * u.deg)), (((-90) * u.deg), ([1, 0] * u.deg))])
def test_skycoord_skyoffset_frame_rotation(rotation, expectedlatlon):
 origin = SkyCoord((45 * u.deg), (45 * u.deg))
 target = SkyCoord((45 * u.deg), (46 * u.deg))
 aframe = origin.skyoffset_frame(rotation=rotation)
 trans = target.transform_to(aframe)
 assert_allclose([trans.lon.wrap_at((180 * u.deg)), trans.lat], expectedlatlon, atol=(1e-10 * u.deg))

@ pytest . mark . parametrize ( u'rotation, expectedlatlon' , [ ( ( 0 * u . deg ) , ( [ 0 , 1 ] * u . deg ) ) , ( ( 180 * u . deg ) , ( [ 0 , ( - 1 ) ] * u . deg ) ) , ( ( 90 * u . deg ) , ( [ ( - 1 ) , 0 ] * u . deg ) ) , ( ( ( - 90 ) * u . deg ) , ( [ 1 , 0 ] * u . deg ) ) ] ) def test_skycoord_skyoffset_frame_rotation ( rotation , expectedlatlon ) : origin = SkyCoord ( ( 45 * u . deg ) , ( 45 * u . deg ) ) target = SkyCoord ( ( 45 * u . deg ) , ( 46 * u . deg ) ) aframe = origin . skyoffset_frame ( rotation = rotation ) trans = target . transform_to ( aframe ) assert_allclose ( [ trans . lon . wrap_at ( ( 180 * u . deg ) ) , trans . lat ] , expectedlatlon , atol = ( 1e-10 * u . deg ) )
test if passing a rotation argument via skycoord works .