コード例 #1
0
def main(csv_file, output):
    
    graph = Graph()
    records = csv.reader(open(csv_file, 'r'))
    for record in open_csv(csv_file):
        graph.add_node(record[0], record[1], record[2], record[3], record[4])

    # TODO - get this to work directly with graphviz rather than a screen print
    print graph.render()
コード例 #2
0
ファイル: tests.py プロジェクト: pydanny/graph_vizualizer
 def test_dupes(self):
     
     graph = Graph()
     node = Node('alpha','box','default')
     graph.add_node(node)
     self.assertRaises(DuplicateNode, graph.add_node, node)