@@ -2769,7 +2769,12 @@ def gather_output(field, output_dir):
27692769
27702770 my_output_spec = SpecInfo (
27712771 name = "Output" ,
2772- fields = [("newfile" , attr .ib (type = File , metadata = {"callable" : gather_output }))],
2772+ fields = [
2773+ (
2774+ "newfile" ,
2775+ attr .ib (type = MultiOutputFile , metadata = {"callable" : gather_output }),
2776+ )
2777+ ],
27732778 bases = (ShellOutSpec ,),
27742779 )
27752780 shelly = ShellCommandTask (
@@ -2781,6 +2786,11 @@ def gather_output(field, output_dir):
27812786 # newfile is a list
27822787 assert len (res .output .newfile ) == 2
27832788 assert all ([file .exists for file in res .output .newfile ])
2789+ assert (
2790+ shelly .output_names
2791+ == shelly .generated_output_names
2792+ == ["return_code" , "stdout" , "stderr" , "newfile" ]
2793+ )
27842794
27852795
27862796@pytest .mark .parametrize ("results_function" , [result_no_submitter , result_submitter ])
@@ -3238,7 +3248,11 @@ def get_lowest_directory(directory_path):
32383248 cache_dir = tmpdir ,
32393249 resultsDir = "test" , # Path(tmpdir) / "test" TODO: Not working without absolute path support
32403250 )
3241-
3251+ assert (
3252+ shelly .output_names
3253+ == shelly .generated_output_names
3254+ == ["return_code" , "stdout" , "stderr" , "resultsDir" ]
3255+ )
32423256 res = results_function (shelly , plugin )
32433257 print ("Cache_dirr:" , shelly .cache_dir )
32443258 assert (shelly .output_dir / Path ("test" )).exists () == True
0 commit comments