Skip to content

Commit 16df78c

Browse files
committed
TEST: Add regression test for merge nodes
1 parent 433d2a0 commit 16df78c

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

sdcflows/workflows/tests/test_base.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,15 @@ def test_fmap_wf(tmpdir, workdir, outdir, bids_layouts, dataset, subject):
6262
if workdir:
6363
wf.base_dir = str(workdir)
6464

65-
if os.getenv("GITHUB_ACTIONS") != "true":
66-
wf.run(plugin="Linear")
65+
if os.getenv("GITHUB_ACTIONS") == "true":
66+
return
67+
68+
res = wf.run(plugin="Linear")
69+
70+
# Regression test for when out_merge_fmap_coeff was flattened and would
71+
# have twice as many elements as the other nodes
72+
assert all(
73+
len(node.result.outputs.out) == len(estimators)
74+
for node in res.nodes
75+
if node.name.startswith("out_merge_")
76+
)

0 commit comments

Comments
 (0)