示例#1
0
def test_tree_extract_path_fragments():
    subtree = Tree('fragment', [Token('NAME', 'two')])
    tree = Tree('path', [Token('NAME', 'one'), subtree, subtree])
    assert tree.extract_path() == 'one.two.two'
示例#2
0
def test_tree_extract_path_fragments():
    subtree = Tree("fragment", [Token("NAME", "two")])
    tree = Tree("path", [Token("NAME", "one"), subtree, subtree])
    assert tree.extract_path() == "one.two.two"
示例#3
0
def test_tree_extract_path():
    tree = Tree('path', [Token('NAME', 'one')])
    assert tree.extract_path() == 'one'
示例#4
0
def test_tree_extract_path():
    tree = Tree("path", [Token("NAME", "one")])
    assert tree.extract_path() == "one"