def test_postOrder(): t = BinaryTreeSearch() t.add(5) t.add(9) t.add(4) t.add(14) t.add(7) t.add(6) t.add(3) actual = t.postOrder() expected = [ 3, 4, 6, 7, 14, 9, 5, ] assert actual == expected
def test_postOrder_on_empty(): t = BinaryTreeSearch() actual = t.postOrder() expected = [None] assert actual == expected