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'
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"
def test_tree_extract_path(): tree = Tree('path', [Token('NAME', 'one')]) assert tree.extract_path() == 'one'
def test_tree_extract_path(): tree = Tree("path", [Token("NAME", "one")]) assert tree.extract_path() == "one"