'Ensure that using cols from an existing table gives
a clean copy.'

def test_from_table_cols(self, table_types):

    self._setup(table_types)
    t = self.t
    cols = t.columns
    t2a = table_types.Table([cols['a'], cols['b'], self.c])
    t2b = table_types.Table()
    t2b.add_column(cols['a'])
    t2b.add_column(cols['b'])
    t2b.add_column(self.c)
    t['a'][1] = 20
    t['b'][1] = 21
    for t2 in [t2a, t2b]:
        t2['a'][2] = 10
        t2['b'][2] = 11
        t2['c'][2] = 12
        t2.columns['a'].meta['aa'][3] = 10
        assert np.all((t['a'] == np.array([1, 20, 3])))
        assert np.all((t['b'] == np.array([4, 21, 6])))
        assert np.all((t2['a'] == np.array([1, 2, 10])))
        assert np.all((t2['b'] == np.array([4, 5, 11])))
        assert np.all((t2['c'] == np.array([7, 8, 12])))
        assert (t2['a'].name == 'a')
        assert (t2.columns['a'].meta['aa'][3] == 10)
        assert (t.columns['a'].meta['aa'][3] == 3)
