def test_tree_first_child_empty(): tree = Tree('rule', []) with raises(AssertionError): tree.first_child()
def test_tree_first_child_multiple(): tree = Tree('rule', ['child', 'child2']) assert tree.first_child() == 'child'
def test_tree_first_child_multiple(): tree = Tree("rule", ["child", "child2"]) assert tree.first_child() == "child"
def test_tree_first_child(): tree = Tree('rule', ['child']) assert tree.first_child() == 'child'
def test_tree_first_child(): tree = Tree("rule", ["child"]) assert tree.first_child() == "child"