@@ -2769,7 +2769,12 @@ def gather_output(field, output_dir):
2769
2769
2770
2770
my_output_spec = SpecInfo (
2771
2771
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
+ ],
2773
2778
bases = (ShellOutSpec ,),
2774
2779
)
2775
2780
shelly = ShellCommandTask (
@@ -2781,6 +2786,11 @@ def gather_output(field, output_dir):
2781
2786
# newfile is a list
2782
2787
assert len (res .output .newfile ) == 2
2783
2788
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
+ )
2784
2794
2785
2795
2786
2796
@pytest .mark .parametrize ("results_function" , [result_no_submitter , result_submitter ])
@@ -3238,7 +3248,11 @@ def get_lowest_directory(directory_path):
3238
3248
cache_dir = tmpdir ,
3239
3249
resultsDir = "test" , # Path(tmpdir) / "test" TODO: Not working without absolute path support
3240
3250
)
3241
-
3251
+ assert (
3252
+ shelly .output_names
3253
+ == shelly .generated_output_names
3254
+ == ["return_code" , "stdout" , "stderr" , "resultsDir" ]
3255
+ )
3242
3256
res = results_function (shelly , plugin )
3243
3257
print ("Cache_dirr:" , shelly .cache_dir )
3244
3258
assert (shelly .output_dir / Path ("test" )).exists () == True
0 commit comments