예제 #1
0
파일: test_parse.py 프로젝트: jwg4/pyvirgo
def test_parse_simple_edge():
    s = "a -> b"
    result = parse(s)
    assert result is not None
    assert "a" in result.nodes
    assert list(result.direct_successors_of("a")) == ["b"]
    assert list(result.direct_successors_of("b")) == []
예제 #2
0
파일: test_parse.py 프로젝트: jwg4/pyvirgo
def test_parse_simple_node_description_with_line_continuation_in_desc():
    s = "\n\nparser = `goyacc |\nparser.y`"
    result = parse(s)
    assert result is not None
    assert "parser" in result.nodes
    assert result.nodes["parser"] == "goyacc parser.y"
예제 #3
0
파일: test_parse.py 프로젝트: jwg4/pyvirgo
def test_parse_simple_node_description_with_blank_lines():
    s = "\n\nparser = `goyacc parser.y`"
    result = parse(s)
    assert result is not None
    assert "parser" in result.nodes
    assert result.nodes["parser"] == "goyacc parser.y"
예제 #4
0
파일: test_parse.py 프로젝트: jwg4/pyvirgo
def test_parse_simple_node_description():
    s = "parser = `goyacc parser.y`"
    result = parse(s)
    assert result is not None
    assert "parser" in result.nodes
    assert result.nodes["parser"] == "goyacc parser.y"
예제 #5
0
파일: test_parse.py 프로젝트: jwg4/pyvirgo
def test_parse_simple_edge_with_newline():
    s = "a -> b\n"
    result = parse(s)
    assert result is not None