示例#1
0
def test_num_nodes():
  assert(f.num_nodes(smalltree) == 2)
  assert(f.num_nodes(mediumtree) == 21)

  assert(f.num_nodes(smalltree) == f.length(smalltree))
  assert(f.num_nodes(mediumtree) == f.length(mediumtree))
示例#2
0
def test_length():
  assert(f.length(smalltree) == 2)
  assert(f.length(mediumtree) == 21)

  assert(f.length(smalltree) == f.length(f.compress(smalltree)))
  assert(f.length(mediumtree) == f.length(f.compress(mediumtree)))