From 04e569a904399d07b1473c1a832cf54fb4ab1ce8 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Wed, 7 Dec 2022 21:58:51 -0500 Subject: [PATCH] TEST: Add regression test for merge nodes --- sdcflows/workflows/tests/test_base.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sdcflows/workflows/tests/test_base.py b/sdcflows/workflows/tests/test_base.py index f9f48a5440..234c89058e 100644 --- a/sdcflows/workflows/tests/test_base.py +++ b/sdcflows/workflows/tests/test_base.py @@ -63,4 +63,12 @@ def test_fmap_wf(tmpdir, workdir, outdir, bids_layouts, dataset, subject): wf.base_dir = str(workdir) if os.getenv("GITHUB_ACTIONS") != "true": - wf.run(plugin="Linear") + res = wf.run(plugin="Linear") + + # Regression test for when out_merge_fmap_coeff was flattened and would + # have twice as many elements as the other nodes + assert all( + len(node.result.outputs.out) == len(estimators) + for node in res.nodes + if node.name.startswith("out_merge_") + )