def test_replace_update_column_via_setitem():
 a = ([1, 2] * u.m)
 b = [3, 4]
 t = table.QTable([a, b], names=['a', 'b'])
 assert isinstance(t['a'], u.Quantity)
 ta = t['a']
 t['a'] = (5 * u.m)
 assert np.all((t['a'] == ([5, 5] * u.m)))
 assert (t['a'] is ta)
 t['a'] = [5, 6]
 assert np.all((t['a'] == [5, 6]))
 assert isinstance(t['a'], table.Column)
 assert (t['a'] is not ta)

def test_replace_update_column_via_setitem ( ) : a = ( [ 1 , 2 ] * u . m ) b = [ 3 , 4 ] t = table . QTable ( [ a , b ] , names = [ 'a' , 'b' ] ) assert isinstance ( t [ 'a' ] , u . Quantity ) ta = t [ 'a' ] t [ 'a' ] = ( 5 * u . m ) assert np . all ( ( t [ 'a' ] == ( [ 5 , 5 ] * u . m ) ) ) assert ( t [ 'a' ] is ta ) t [ 'a' ] = [ 5 , 6 ] assert np . all ( ( t [ 'a' ] == [ 5 , 6 ] ) ) assert isinstance ( t [ 'a' ] , table . Column ) assert ( t [ 'a' ] is not ta )
test table update like t[a] = value .