'Test that ``location`` specified by using any valid unit
(length/angle) in ``Time`` columns gets stored in FITS
as ITRS Cartesian coordinates (X, Y, Z), each in m.
Test that it round-trips through FITS.'

@pytest.mark.parametrize('table_types', (Table, QTable))
def test_time_loc_unit(self, table_types):

    t = table_types()
    t['a'] = Time(self.time, format='isot', scale='utc', location=EarthLocation(1, 2, 3, unit='km'))
    (table, hdr) = time_to_fits(t)
    (hdr['OBSGEO-X'] == t['a'].location.x.to_value(unit='m'))
    (hdr['OBSGEO-Y'] == t['a'].location.y.to_value(unit='m'))
    (hdr['OBSGEO-Z'] == t['a'].location.z.to_value(unit='m'))
    t.write(self.temp('time.fits'), format='fits', overwrite=True, astropy_native=True)
    tm = table_types.read(self.temp('time.fits'), format='fits', astropy_native=True)
    (tm['a'].location == t['a'].location)
    (tm['a'].location.x.value == t['a'].location.x.to_value(unit='m'))
    (tm['a'].location.y.value == t['a'].location.y.to_value(unit='m'))
    (tm['a'].location.z.value == t['a'].location.z.to_value(unit='m'))
