Skip to content

Commit

Permalink
mg add graph structure
Browse files Browse the repository at this point in the history
  • Loading branch information
kmantel committed Nov 2, 2023
1 parent daa0308 commit 414fab1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
13 changes: 0 additions & 13 deletions tests/scheduling/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,3 @@ def three_node_linear_composition():
comp.add_linear_processing_pathway([A, B, C])

return comp.nodes, comp


@pytest.helpers.register
def gen_linear_graph(*nodes):
try:
graph = {nodes[0]: set()}
except IndexError:
graph = {}

for i in range(1, len(nodes)):
graph[nodes[i]] = {nodes[i - 1]}

return graph
2 changes: 1 addition & 1 deletion tests/scheduling/test_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def test_delete_counts(self):
assert sched.execution_list[eid_repeat] == repeat_run_2 + repeat_run_2

def test_add_graph_structure_conditions(self):
initial_graph = pytest.helpers.gen_linear_graph('A', 'B', 'C', 'D', 'E')
initial_graph = pytest.helpers.create_graph_from_pathways(['A', 'B', 'C', 'D', 'E'])
initial_conds = {'A': gs.AddEdgeTo('C')}
scheduler = gs.Scheduler(initial_graph, initial_conds)

Expand Down

0 comments on commit 414fab1

Please sign in to comment.