def test_replace_update_column_via_setitem_replace_inplace():
 t = table.Table([[1, 2, 3], [4, 5, 6]], names=['a', 'b'])
 ta = t['a']
 t['a'].unit = 'm'
 with catch_warnings() as w:
  with table.conf.set_temp('replace_inplace', True):
   with table.conf.set_temp('replace_warnings', ['always', 'refcount', 'attributes', 'slice']):
    t['a'] = 0
    assert (len(w) == 0)
    assert (ta is t['a'])
    t['a'] = [10, 20, 30]
    assert (len(w) == 0)
    assert (ta is t['a'])
    assert np.all((t['a'] == [10, 20, 30]))

def test_replace_update_column_via_setitem_replace_inplace ( ) : t = table . Table ( [ [ 1 , 2 , 3 ] , [ 4 , 5 , 6 ] ] , names = [ 'a' , 'b' ] ) ta = t [ 'a' ] t [ 'a' ] . unit = 'm' with catch_warnings ( ) as w : with table . conf . set_temp ( 'replace_inplace' , True ) : with table . conf . set_temp ( 'replace_warnings' , [ 'always' , 'refcount' , 'attributes' , 'slice' ] ) : t [ 'a' ] = 0 assert ( len ( w ) == 0 ) assert ( ta is t [ 'a' ] ) t [ 'a' ] = [ 10 , 20 , 30 ] assert ( len ( w ) == 0 ) assert ( ta is t [ 'a' ] ) assert np . all ( ( t [ 'a' ] == [ 10 , 20 , 30 ] ) )
test the replace_inplace config option related to #5556 .