'Test Time formats that are allowed to take quantity input.'

def test_valid_quantity_input(self):

    q = (2450000.125 * u.day)
    t1 = Time(q, format='jd', scale='utc')
    assert (t1.value == q.value)
    q2 = q.to(u.second)
    t2 = Time(q2, format='jd', scale='utc')
    assert (t2.value == q.value == q2.to_value(u.day))
    q3 = (q - (2400000.5 * u.day))
    t3 = Time(q3, format='mjd', scale='utc')
    assert (t3.value == q3.value)
    qs = ((24.0 * 36.0) * u.second)
    t4 = Time(q3, qs, format='mjd', scale='utc')
    assert (t4.value == (q3 + qs).to_value(u.day))
    qy = (1990.0 * u.yr)
    ty1 = Time(qy, format='jyear', scale='utc')
    assert (ty1.value == qy.value)
    ty2 = Time(qy.to(u.day), format='jyear', scale='utc')
    assert (ty2.value == qy.value)
    qy2 = (10.0 * u.yr)
    tcxc = Time(qy2, format='cxcsec')
    assert (tcxc.value == qy2.to_value(u.second))
    tgps = Time(qy2, format='gps')
    assert (tgps.value == qy2.to_value(u.second))
    tunix = Time(qy2, format='unix')
    assert (tunix.value == qy2.to_value(u.second))
    qd = ((2000.0 * 365.0) * u.day)
    tplt = Time(qd, format='plot_date', scale='utc')
    assert (tplt.value == qd.value)
