Пример #1
0
def test_tree_first_child_empty():
    tree = Tree('rule', [])
    with raises(AssertionError):
        tree.first_child()
Пример #2
0
def test_tree_first_child_multiple():
    tree = Tree('rule', ['child', 'child2'])
    assert tree.first_child() == 'child'
Пример #3
0
def test_tree_first_child_multiple():
    tree = Tree("rule", ["child", "child2"])
    assert tree.first_child() == "child"
Пример #4
0
def test_tree_first_child():
    tree = Tree('rule', ['child'])
    assert tree.first_child() == 'child'
Пример #5
0
def test_tree_first_child():
    tree = Tree("rule", ["child"])
    assert tree.first_child() == "child"