Skip to content

Commit bd7b312

Browse files
committed
adding shell task to the bosh wf
1 parent 0073e15 commit bd7b312

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

pydra/engine/tests/test_boutiques.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import pytest
55

66
from ..core import Workflow
7+
from ..task import ShellCommandTask
78
from ..submitter import Submitter
89
from ..boutiques import BoshTask
910
from .utils import result_no_submitter, result_submitter
@@ -81,7 +82,7 @@ def test_boutiques_wf_1(maskfile, plugin):
8182
)
8283
@pytest.mark.parametrize("plugin", Plugins)
8384
def test_boutiques_wf_2(maskfile, plugin):
84-
""" wf with two tasks that run fsl.bet and fsl.stats using BoshTask"""
85+
""" wf with two BoshTasks (fsl.bet and fsl.stats) and one ShellTask"""
8586
wf = Workflow(name="wf", input_spec=["maskfile", "infile"])
8687
wf.inputs.maskfile = maskfile
8788
wf.inputs.infile = Infile
@@ -102,9 +103,14 @@ def test_boutiques_wf_2(maskfile, plugin):
102103
v=True,
103104
)
104105
)
106+
wf.add(ShellCommandTask(name="cat", executable="cat", args=wf.stat.lzout.output))
105107

106108
wf.set_output(
107-
[("outfile_bet", wf.bet.lzout.outfile), ("out_stat", wf.stat.lzout.output)]
109+
[
110+
("outfile_bet", wf.bet.lzout.outfile),
111+
("out_stat", wf.stat.lzout.output),
112+
("out", wf.cat.lzout.stdout),
113+
]
108114
)
109115

110116
with Submitter(plugin=plugin) as sub:
@@ -116,3 +122,6 @@ def test_boutiques_wf_2(maskfile, plugin):
116122

117123
assert res.output.out_stat.name == "output.txt"
118124
assert res.output.out_stat.exists()
125+
126+
assert int(res.output.out.rstrip().split()[0]) == 11534336
127+
assert float(res.output.out.rstrip().split()[1]) == 11534336.0

0 commit comments

Comments
 (0)