@remote_data
@pytest.mark.skipif(u'not HAS_JPLEPHEM')
@pytest.mark.parametrize(u'time', (Time(u'1960-01-12 00:00'), Time(u'1980-03-25 00:00'), Time(u'2010-10-13 00:00')))
def test_get_sun_consistency(time):
 sun_jpl_gcrs = get_body(u'sun', time, ephemeris=u'de432s')
 builtin_get_sun = get_sun(time)
 sep = builtin_get_sun.separation(sun_jpl_gcrs)
 assert (sep < (0.1 * u.arcsec))

@ remote_data @ pytest . mark . skipif ( u'not HAS_JPLEPHEM' ) @ pytest . mark . parametrize ( u'time' , ( Time ( u'1960-01-12 00:00' ) , Time ( u'1980-03-25 00:00' ) , Time ( u'2010-10-13 00:00' ) ) ) def test_get_sun_consistency ( time ) : sun_jpl_gcrs = get_body ( u'sun' , time , ephemeris = u'de432s' ) builtin_get_sun = get_sun ( time ) sep = builtin_get_sun . separation ( sun_jpl_gcrs ) assert ( sep < ( 0.1 * u . arcsec ) )
test that the sun from jpl and the builtin get_sun match .