def test_tree_last_child_empty(): tree = Tree('rule', []) with raises(AssertionError): tree.last_child()
def test_tree_last_child_multiple(): tree = Tree('rule', ['child', 'child2']) assert tree.last_child() == 'child2'
def test_tree_last_child_multiple(): tree = Tree("rule", ["child", "child2"]) assert tree.last_child() == "child2"
def test_tree_last_child(): tree = Tree('rule', ['child']) assert tree.last_child() == 'child'
def test_tree_last_child(): tree = Tree("rule", ["child"]) assert tree.last_child() == "child"