def test_unix_conversion(input_date, expected): assert AstroUtils.time_agile_seconds_to_iso(input_date) == expected["iso"] assert AstroUtils.time_agile_seconds_to_jd(input_date) == pytest.approx( expected["jd"], 0.00001) assert AstroUtils.time_agile_seconds_to_mjd(input_date) == pytest.approx( expected["mjd"], 0.00001) assert AstroUtils.time_agile_seconds_to_unix( input_date) == expected["unix"] assert AstroUtils.time_agile_seconds_to_fits( input_date) == expected["fits"]
def test_astro_utils_time_agile_seconds_to_jd(self): jd = AstroUtils.time_agile_seconds_to_jd(449582332) assert jd == pytest.approx(2458208.99921296, 0.00001)