def test_polylines():
    file = "./undirected/polylines.gv.txt"
    xml = graphviz2drawio.convert(file)
    print(xml)

    root = ET.fromstring(xml)
    check_xml_top(root)
Exemple #2
0
def test_hello():
    file = "./directed/hello.gv.txt"
    xml = graphviz2drawio.convert(file)
    print(xml)

    root = ET.fromstring(xml)
    elements = check_xml_top(root)

    hello = elements[3]
    check_style(hello, "ellipse")
    check_value(hello, "Hello")

    world = elements[4]
    check_style(world, "ellipse")
    check_value(world, "World")
    edge = elements[2]
    check_edge(edge, hello, world)
    check_edge_dir(edge, dx=0, dy=1)
def test_port():
    file = "./directed/port.gv.txt"
    xml = graphviz2drawio.convert(file)
    root = ET.fromstring(xml)
    elements = check_xml_top(root)
    check_edge(elements[2], elements[4], elements[5])