Commit 4e6377be authored by Bram Schoenmakers's avatar Bram Schoenmakers

Make Dot output deterministic

parent 9ad89685
......@@ -197,10 +197,10 @@ class DirectedGraph(object):
""" Prints the graph in Dot format. """
out = 'digraph g {\n'
for from_node, neighbors in self._edges.items():
for from_node, neighbors in sorted(self._edges.items()):
out += " {}\n".format(from_node)
for neighbor in neighbors:
for neighbor in sorted(neighbors):
out += " {} -> {}".format(from_node, neighbor)
edge_id = self.edge_id(from_node, neighbor)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment