def test_BST_pre_order():
    bst = BinarySearchTree()
    bst.add(1)
    bst.add(3)
    bst.add(20)
    bst.add(7)
    bst.add(8)
    actual = bst.pre_order()
    expected = [1, 3, 20, 7, 8]
    assert actual == expected
def test_pre():
    bst = BinarySearchTree()
    bst.add(1)
    bst.add(2)
    bst.add(3)
    bst.add(4)
    bst.add(5)
    actual = bst.pre_order()
    expected = [1, 2, 3, 4, 5]
    assert actual == expected
def test_BST_pre_order_2():
    bst = BinarySearchTree()
    bst.add(5)
    bst.add(7)
    bst.add(8)
    bst.add(6)
    bst.add(3)
    bst.add(2)
    bst.add(4)
    actual = bst.pre_order()
    expected = [5, 3, 2, 4, 7, 6, 8]
    assert actual == expected