Skip to content

Commit

Permalink
fix: reset test_nodes so that the OutputMultiObject issue surfaces
Browse files Browse the repository at this point in the history
Once we figure out the problem of ``OutputMultiObject``, we could go
ahead and set fix nipy#2944, fix nipreps/fmriprep#1674, close nipy#2945.
  • Loading branch information
oesteban committed Aug 1, 2019
1 parent 4d2ed1c commit 9dcce52
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions nipype/pipeline/engine/tests/test_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,13 @@ def test_inputs_removal(tmpdir):
def test_outputmultipath_collapse(tmpdir):
"""Test an OutputMultiPath whose initial value is ``[[x]]`` to ensure that
it is returned as ``[x]``, regardless of how accessed."""
select_if = niu.Select(inlist=[[1, 2, 3], [4, 5]], index=1)
select_nd = pe.Node(niu.Select(inlist=[[1, 2, 3], [4, 5]], index=1),
select_if = niu.Select(inlist=[[1, 2, 3], [4]], index=1)
select_nd = pe.Node(niu.Select(inlist=[[1, 2, 3], [4]], index=1),
name='select_nd')

ifres = select_if.run()
ndres = select_nd.run()

assert ifres.outputs.out == [4, 5]
assert ndres.outputs.out == [4, 5]
assert select_nd.result.outputs.out == [4, 5]
assert ifres.outputs.out == [4]
assert ndres.outputs.out == [4]
assert select_nd.result.outputs.out == [4]

0 comments on commit 9dcce52

Please sign in to comment.