@@ -1351,14 +1351,8 @@ def test_traceback(tmpdir):
13511351 def FunError (x ):
13521352 raise Exception ("Error from the function" )
13531353
1354- task = Task (
1355- name = "error" ,
1356- definition = FunError ().split ("x" , x = [3 , 4 ]),
1357- submitter = Submitter (cache_dir = tmpdir ),
1358- )
1359-
1360- with pytest .raises (Exception , match = "from the function" ) as exinfo :
1361- task .run ()
1354+ with pytest .raises (Exception , match = "Task 'FunError' raised an error" ) as exinfo :
1355+ FunError (x = 3 )(worker = "cf" , cache_dir = tmpdir )
13621356
13631357 # getting error file from the error message
13641358 error_file_match = str (exinfo .value ).split ("here: " )[- 1 ].split ("_error.pklz" )[0 ]
@@ -1383,12 +1377,12 @@ def FunError(x):
13831377 raise Exception ("Error from the function" )
13841378
13851379 @workflow .define
1386- def Workflow (x ):
1387- error = workflow .add (FunError (x = x ), name = "error " )
1388- return error .out
1380+ def Workflow (x_list ):
1381+ fun_error = workflow .add (FunError (). split ( x = x_list ), name = "fun_error " )
1382+ return fun_error .out
13891383
1390- wf = Workflow (). split ( "x" , x = [3 , 4 ])
1391- with pytest .raises (Exception , match = "Task error raised an error" ) as exinfo :
1384+ wf = Workflow (x_list = [3 , 4 ])
1385+ with pytest .raises (Exception , match = "Task 'fun_error' raised an error" ) as exinfo :
13921386 wf (worker = "cf" )
13931387
13941388 # getting error file from the error message
@@ -1463,7 +1457,7 @@ class Defn(ShellDef["Defn.Outputs"]):
14631457 a1_field : str
14641458 b2_field : float
14651459 c3_field : ty .Dict [str , str ]
1466- d4_field : ty .List [str ]
1460+ d4_field : ty .List [str ] = shell . arg ( sep = " " )
14671461 executable = "dummy"
14681462
14691463 class Outputs (ShellOutputs ):
0 commit comments