File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ @testset " get_slurm_ntasks_int()" begin
2
+ c = withenv (SLURM_NTASKS => " 56" ) do
3
+ SlurmClusterManager. get_slurm_jobid_int ()
4
+ end
5
+ @test c == 34
1
6
7
+ withenv (" SLURM_NTASKS" => nothing ) do
8
+ @test_throws ErrorException SlurmClusterManager. get_slurm_jobid_int ()
9
+ end
10
+ end
11
+
12
+ @testset " get_slurm_jobid_int()" begin
13
+ a = withenv (" SLURM_JOB_ID" => " 12" , SLURM_JOBID => nothing ) do
14
+ SlurmClusterManager. get_slurm_jobid_int ()
15
+ end
16
+ @test a == 12
17
+
18
+ b = withenv (" SLURM_JOB_ID" => nothing , SLURM_JOBID => " 34" ) do
19
+ SlurmClusterManager. get_slurm_jobid_int ()
20
+ end
21
+ @test a == 34
22
+
23
+ withenv (" SLURM_JOB_ID" => nothing , SLURM_JOBID => nothing ) do
24
+ @test_throws ErrorException SlurmClusterManager. get_slurm_jobid_int ()
25
+ end
26
+ end
You can’t perform that action at this time.
0 commit comments