def test_table_deletion():
 deleted = set()
 class TestTable(table.Table, ):
  def __del__(self):
   deleted.add(id(self))
 t = TestTable({'a': [1, 2, 3]})
 the_id = id(t)
 assert (t['a'].parent_table is t)
 del t
 gc.collect()
 assert (the_id in deleted)

def test_table_deletion ( ) : deleted = set ( ) class TestTable ( table . Table , ) : def __del__ ( self ) : deleted . add ( id ( self ) ) t = TestTable ( { 'a' : [ 1 , 2 , 3 ] } ) the_id = id ( t ) assert ( t [ 'a' ] . parent_table is t ) del t gc . collect ( ) assert ( the_id in deleted )
regression test for the reference cycle discussed in URL .