Skip to content

Commit

Permalink
fix: Handle new/old networkx graph emissions
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Nov 18, 2024
1 parent d986f53 commit 8e27123
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions nipype/pipeline/engine/tests/test_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,9 @@ def test_write_graph_dotfile(tmpdir, graph_type, simple):
pipe.write_graph(graph2use=graph_type, simple_form=simple, format="dot")

with open("graph.dot") as f:
graph_str = f.read()
# Replace handles change in networkx behavior when graph is missing a name
# Probably around 3, but I haven't tracked it down.
graph_str = f.read().replace(' {', ' {')

if simple:
for line in dotfiles[graph_type]:
Expand Down Expand Up @@ -635,7 +637,9 @@ def test_write_graph_dotfile_iterables(tmpdir, graph_type, simple):
pipe.write_graph(graph2use=graph_type, simple_form=simple, format="dot")

with open("graph.dot") as f:
graph_str = f.read()
# Replace handles change in networkx behavior when graph is missing a name
# Probably around 3, but I haven't tracked it down.
graph_str = f.read().replace(' {', ' {')

if simple:
for line in dotfiles_iter[graph_type]:
Expand Down

0 comments on commit 8e27123

Please sign in to comment.