@@ -2769,7 +2769,7 @@ 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 = [("newfile" , attr .ib (type = MultiOutputFile , metadata = {"callable" : gather_output }))],
2773
2773
bases = (ShellOutSpec ,),
2774
2774
)
2775
2775
shelly = ShellCommandTask (
@@ -2781,6 +2781,12 @@ def gather_output(field, output_dir):
2781
2781
# newfile is a list
2782
2782
assert len (res .output .newfile ) == 2
2783
2783
assert all ([file .exists for file in res .output .newfile ])
2784
+ assert (
2785
+ shelly .output_names
2786
+ == shelly .generated_output_names
2787
+ == ["return_code" , "stdout" , "stderr" , "newfile" ]
2788
+ )
2789
+
2784
2790
2785
2791
2786
2792
@pytest .mark .parametrize ("results_function" , [result_no_submitter , result_submitter ])
@@ -3106,6 +3112,7 @@ def get_stderr(stderr):
3106
3112
shelly = ShellCommandTask (
3107
3113
name = "shelly" , executable = cmd , args = args , output_spec = my_output_spec
3108
3114
).split ("args" )
3115
+
3109
3116
3110
3117
results = results_function (shelly , plugin )
3111
3118
for index , res in enumerate (results ):
@@ -3238,7 +3245,11 @@ def get_lowest_directory(directory_path):
3238
3245
cache_dir = tmpdir ,
3239
3246
resultsDir = "test" , # Path(tmpdir) / "test" TODO: Not working without absolute path support
3240
3247
)
3241
-
3248
+ assert (
3249
+ shelly .output_names
3250
+ == shelly .generated_output_names
3251
+ == ["return_code" , "stdout" , "stderr" , "resultsDir" ]
3252
+ )
3242
3253
res = results_function (shelly , plugin )
3243
3254
print ("Cache_dirr:" , shelly .cache_dir )
3244
3255
assert (shelly .output_dir / Path ("test" )).exists () == True
0 commit comments