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