MCPcopy Create free account
hub / github.com/scottrogowski/code2flow / get_nodes_set_from_file

Function get_nodes_set_from_file

tests/test_graphs.py:83–94  ·  view source on GitHub ↗
(dot_file)

Source from the content-addressed store, hash-verified

81
82
83def get_nodes_set_from_file(dot_file):
84 dot_file.seek(0)
85 ag = pygraphviz.AGraph(dot_file.read())
86 generated_nodes = []
87 for node in ag.nodes():
88 if not node.attr['name']:
89 # skip the first which is a legend
90 continue
91 generated_nodes.append(node.attr['name'])
92 ret = set(generated_nodes)
93 assert_eq(set(list(ret)), set(generated_nodes)) # assert no dupes
94 return ret
95
96
97def get_edges_set_from_file(dot_file):

Callers 2

make_expected.pyFile · 0.90
test_allFunction · 0.85

Calls 2

setFunction · 0.85
assert_eqFunction · 0.85

Tested by

no test coverage detected