Beispiel #1
0
def test_leafs():
    node = Node("0")
    node.extend(["1", "2"])

    assert len(node.leafs) == 2
Beispiel #2
0
def test_lt(simple_node):
    node = Node("1")
    node.extend(["3", "4"])
    assert node < simple_node
Beispiel #3
0
def test_contains(simple_node):
    node = Node("1")
    node.extend(["3", "4"])
    assert node in simple_node
Beispiel #4
0
def test_eq(simple_node):
    node = Node("1")
    node.extend(["3", "4"])
    assert node == simple_node["1"]
Beispiel #5
0
def simple_node():
    node = Node("0")
    node.extend(["1", "2"])
    node["1"].extend(["3", "4"])

    return node