4
4
import pytest
5
5
6
6
from ..core import Workflow
7
+ from ..task import ShellCommandTask
7
8
from ..submitter import Submitter
8
9
from ..boutiques import BoshTask
9
10
from .utils import result_no_submitter , result_submitter
@@ -81,7 +82,7 @@ def test_boutiques_wf_1(maskfile, plugin):
81
82
)
82
83
@pytest .mark .parametrize ("plugin" , Plugins )
83
84
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 """
85
86
wf = Workflow (name = "wf" , input_spec = ["maskfile" , "infile" ])
86
87
wf .inputs .maskfile = maskfile
87
88
wf .inputs .infile = Infile
@@ -102,9 +103,14 @@ def test_boutiques_wf_2(maskfile, plugin):
102
103
v = True ,
103
104
)
104
105
)
106
+ wf .add (ShellCommandTask (name = "cat" , executable = "cat" , args = wf .stat .lzout .output ))
105
107
106
108
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
+ ]
108
114
)
109
115
110
116
with Submitter (plugin = plugin ) as sub :
@@ -116,3 +122,6 @@ def test_boutiques_wf_2(maskfile, plugin):
116
122
117
123
assert res .output .out_stat .name == "output.txt"
118
124
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