Ejemplo n.º 1
0
def test_tree_last_child_empty():
    tree = Tree('rule', [])
    with raises(AssertionError):
        tree.last_child()
Ejemplo n.º 2
0
def test_tree_last_child_multiple():
    tree = Tree('rule', ['child', 'child2'])
    assert tree.last_child() == 'child2'
Ejemplo n.º 3
0
def test_tree_last_child_multiple():
    tree = Tree("rule", ["child", "child2"])
    assert tree.last_child() == "child2"
Ejemplo n.º 4
0
def test_tree_last_child():
    tree = Tree('rule', ['child'])
    assert tree.last_child() == 'child'
Ejemplo n.º 5
0
def test_tree_last_child():
    tree = Tree("rule", ["child"])
    assert tree.last_child() == "child"