예제 #1
0
def test_zip_leaf_node():
    bt1 = Leaf(1)
    bt2 = Node(4, Leaf(5), Leaf(6))
    with pytest.raises(AssertionError):
        bt1.zip(bt2)
예제 #2
0
def test_zip_leaf():
    bt1 = Leaf(1)
    bt2 = Leaf(2)
    exp = Leaf((1, 2))
    res = bt1.zip(bt2)
    assert exp == res