def test_bst_to_string_tree_with_7_nodes(self): bst = BinarySearchTree() values_list = [4, 2, 1, 3, 6, 5, 7] bst.insert_list(values_list) printlines = bst.to_string(bst.root) self.assertEquals(printlines, TREE_WITH_7)
def test_bst_to_string_tree_with_7_nodes(self): bst = BinarySearchTree() values_list = [4, 2, 1, 3, 6, 5, 7] bst.insert_list(values_list) printlines = bst.to_string(bst.root) self.assertEquals(printlines, TREE_WITH_7)
def test_bst_to_string_tree_with_1_node(self): bst = BinarySearchTree() bst.insert(1) printlines = bst.to_string(bst.root) self.assertEquals(printlines, TREE_WITH_1)
def test_bst_to_string_tree_with_1_node(self): bst = BinarySearchTree() bst.insert(1) printlines = bst.to_string(bst.root) self.assertEquals(printlines, TREE_WITH_1)