def test_06_random_trees(self): """Generate 500 random nodes""" NUM_NODES = 500 random_nodes = [random_node(10) for i in xrange(NUM_NODES)] self.assertEqual(len(random_nodes), NUM_NODES)
def random_tree(max_level=20, min_level=1, current_level=0): """generate a random tree of random nodes""" return Tree(random_node(max_level, min_level, current_level))