Ejemplo n.º 1
0
def test_tree_find_position_none():
    """
    Ensures Tree.find_first_token can find the correct Token
    """
    expected = Tree('assignment', [])
    tree = Tree('start', [Tree('block', [Tree('line', [expected])], expected)])
    assert tree._find_position('line') is None
Ejemplo n.º 2
0
def test_tree_find_position_none():
    """
    Ensures Tree.find_first_token can find the correct Token
    """
    expected = Tree("assignment", [])
    tree = Tree("start", [Tree("block", [Tree("line", [expected])], expected)])
    assert tree._find_position("line") is None