示例#1
0
def test_tree_extract():
    target = Tree('target', [])
    tree = Tree('tree', [
        target, Tree('more', [target], Token('test', 'test'))])
    assert tree.extract('target') == [target]
示例#2
0
def test_tree_extract():
    target = Tree("target", [])
    tree = Tree("tree",
                [target, Tree("more", [target], Token("test", "test"))])
    assert tree.extract("target") == [target]