File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -299,6 +299,40 @@ def test_slurm_args_2(tmpdir):
299
299
sub (task )
300
300
301
301
302
+ @need_slurm
303
+ def test_slurm_args_3 (tmpdir ):
304
+ """testing sbatch_args provided to the submitter
305
+ test should pass when valid error sbatch_args is provided
306
+ """
307
+ task = sleep_add_one (x = 1 )
308
+ task .cache_dir = tmpdir
309
+ # submit workflow and every task as slurm job
310
+ with Submitter ("slurm" , sbatch_args = "--error=error.log" ) as sub :
311
+ sub (task )
312
+
313
+ res = task .result ()
314
+ assert res .output .out == 2
315
+ error_log_file = tmpdir / "SlurmWorker_scripts"
316
+ assert error_log_file .exists ()
317
+
318
+
319
+ @need_slurm
320
+ def test_slurm_args_4 (tmpdir ):
321
+ """testing sbatch_args provided to the submitter
322
+ test should pass when valid output sbatch_args is provided
323
+ """
324
+ task = sleep_add_one (x = 1 )
325
+ task .cache_dir = tmpdir
326
+ # submit workflow and every task as slurm job
327
+ with Submitter ("slurm" , sbatch_args = "--output=output.log" ) as sub :
328
+ sub (task )
329
+
330
+ res = task .result ()
331
+ assert res .output .out == 2
332
+ output_log_file = tmpdir / "SlurmWorker_scripts"
333
+ assert output_log_file .exists ()
334
+
335
+
302
336
@mark .task
303
337
def sleep (x , job_name_part ):
304
338
time .sleep (x )
You can’t perform that action at this time.
0 commit comments