def test_breadth_first_bst(): bst = BinarySearchTree() bst.add(4) bst.add(9) bst.add(-1) bst.add(6) bst.add(3) bst.add(8) bst.add(5) actual = bst.breadth_first(bst) expected = [4, 9, 6, 8, 5, -1, 3] assert actual == expected
def test_breadth_3(): tree=BinarySearchTree() assert tree.breadth_first() == 'Empty Tree'