@@ -1674,9 +1674,11 @@ def test_wf_shell_cmd_3(plugin, tmp_path):
16741674 class Shelly1 (ShellDef ["Shelly1.Outputs" ]):
16751675 executable = "shelly"
16761676
1677+ arg : str = shell .arg (argstr = None )
1678+
16771679 class Outputs (ShellOutputs ):
16781680 file : File = shell .outarg (
1679- path_template = "{args }" ,
1681+ path_template = "{arg }" ,
16801682 help = "output file" ,
16811683 )
16821684
@@ -1700,12 +1702,12 @@ class Outputs(ShellOutputs):
17001702 )
17011703
17021704 @workflow .define (outputs = ["touch_file" , "out1" , "cp_file" , "out2" ])
1703- def Workflow (cmd1 , cmd2 , args ):
1705+ def Workflow (cmd1 , cmd2 , arg ):
17041706
17051707 shelly1 = workflow .add (
17061708 Shelly1 (
17071709 executable = cmd1 ,
1708- additional_args = args ,
1710+ arg = arg ,
17091711 )
17101712 )
17111713 shelly2 = workflow .add (
@@ -1717,9 +1719,9 @@ def Workflow(cmd1, cmd2, args):
17171719
17181720 return shelly1 .file , shelly1 .stdout , shelly2 .out_file , shelly2 .stdout
17191721
1720- wf = Workflow (cmd1 = "touch" , cmd2 = "cp" , args = File . mock ( "newfile.txt" ) )
1722+ wf = Workflow (cmd1 = "touch" , cmd2 = "cp" , arg = "newfile.txt" )
17211723
1722- with Submitter (plugin = "debug" ) as sub :
1724+ with Submitter (plugin = "debug" , cache_dir = tmp_path ) as sub :
17231725 res = sub (wf )
17241726
17251727 assert res .outputs .out1 == ""
@@ -1738,14 +1740,19 @@ def test_wf_shell_cmd_3a(plugin, tmp_path):
17381740
17391741 @shell .define
17401742 class Shelly1 (ShellDef ["Shelly1.Outputs" ]):
1743+ executable = "shelly"
1744+ arg : str = shell .outarg (argstr = None )
1745+
17411746 class Outputs (ShellOutputs ):
1747+
17421748 file : File = shell .outarg (
1743- path_template = "{args }" ,
1749+ path_template = "{arg }" ,
17441750 help = "output file" ,
17451751 )
17461752
17471753 @shell .define
17481754 class Shelly2 (ShellDef ["Shelly2.Outputs" ]):
1755+ executable = "shelly2"
17491756 orig_file : str = shell .arg (
17501757 position = 1 ,
17511758 help = "output file" ,
@@ -1761,12 +1768,12 @@ class Outputs(ShellOutputs):
17611768 )
17621769
17631770 @workflow .define (outputs = ["touch_file" , "out1" , "cp_file" , "out2" ])
1764- def Workflow (cmd1 , cmd2 , args ):
1771+ def Workflow (cmd1 , cmd2 , arg ):
17651772
17661773 shelly1 = workflow .add (
17671774 Shelly1 (
17681775 executable = cmd1 ,
1769- additional_args = args ,
1776+ arg = arg ,
17701777 )
17711778 )
17721779 shelly2 = workflow .add (
@@ -1778,7 +1785,7 @@ def Workflow(cmd1, cmd2, args):
17781785
17791786 return shelly1 .file , shelly1 .stdout , shelly2 .out_file , shelly2 .stdout
17801787
1781- wf = Workflow (cmd1 = "touch" , cmd2 = "cp" , args = File . mock ( "newfile.txt" ) )
1788+ wf = Workflow (cmd1 = "touch" , cmd2 = "cp" , arg = "newfile.txt" )
17821789
17831790 with Submitter (plugin = "debug" ) as sub :
17841791 res = sub (wf )
@@ -1861,14 +1868,20 @@ def test_wf_shell_cmd_ndst_1(plugin, tmp_path):
18611868
18621869 @shell .define
18631870 class Shelly1 (ShellDef ["Shelly1.Outputs" ]):
1871+ executable = "shelly"
1872+
1873+ arg : str = shell .arg (argstr = None )
1874+
18641875 class Outputs (ShellOutputs ):
18651876 file : File = shell .outarg (
1866- path_template = "{args }" ,
1877+ path_template = "{arg }" ,
18671878 help = "output file" ,
18681879 )
18691880
18701881 @shell .define
18711882 class Shelly2 (ShellDef ["Shelly2.Outputs" ]):
1883+ executable = "shelly2"
1884+
18721885 orig_file : str = shell .arg (
18731886 position = 1 ,
18741887 help = "output file" ,
@@ -1889,7 +1902,7 @@ def Workflow(cmd1, cmd2, args):
18891902 shelly1 = workflow .add (
18901903 Shelly1 (
18911904 executable = cmd1 ,
1892- ).split ("args " , args = args )
1905+ ).split ("arg " , arg = args )
18931906 )
18941907 shelly2 = workflow .add (
18951908 Shelly2 (
@@ -1903,10 +1916,10 @@ def Workflow(cmd1, cmd2, args):
19031916 wf = Workflow (
19041917 cmd1 = "touch" ,
19051918 cmd2 = "cp" ,
1906- args = [File . mock ( "newfile_1.txt" ), File . mock ( "newfile_2.txt" ) ],
1919+ args = ["newfile_1.txt" , "newfile_2.txt" ],
19071920 )
19081921
1909- with Submitter (plugin = "debug" ) as sub :
1922+ with Submitter (plugin = "debug" , cache_dir = tmp_path ) as sub :
19101923 res = sub (wf )
19111924
19121925 assert res .outputs .out1 == ["" , "" ]
@@ -3288,7 +3301,7 @@ class Outputs(ShellOutputs):
32883301 # An exception should be raised because the second mandatory output does not exist
32893302 with pytest .raises (
32903303 ValueError ,
3291- match = r"file system path provided to mandatory field .* does not exist" ,
3304+ match = r"file system path\(s\) provided to mandatory field .* does not exist" ,
32923305 ):
32933306 shelly (cache_dir = tmp_path )
32943307 # checking if the first output was created
0 commit comments