File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -103,8 +103,7 @@ def completion_time(self, job):
103103 not slurm_state_completed (job .state )):
104104 return self ._completion_time
105105
106- with env .temp_environment (
107- variables = [('SLURM_TIME_FORMAT' , 'standard' )]):
106+ with env .temp_environment (variables = {'SLURM_TIME_FORMAT' : 'standard' }):
108107 completed = os_ext .run_command (
109108 'sacct -S %s -P -j %s -o jobid,end' %
110109 (datetime .now ().strftime ('%F' ), job .jobid ),
Original file line number Diff line number Diff line change @@ -89,10 +89,11 @@ def test_load_restore(self):
8989 assert not self .environ .is_loaded
9090
9191 @fixtures .switch_to_user_runtime
92- def test_temp_environment_context_manager (self ):
93- with env .temp_environment (['testmod_foo' ],
94- [('_var0' , 'val2' ),
95- ('_var3' , 'val3' )]) as environ :
92+ def test_temp_environment (self ):
93+ self .setup_modules_system ()
94+ with env .temp_environment (
95+ ['testmod_foo' ], {'_var0' : 'val2' , '_var3' : 'val3' }
96+ ) as environ :
9697 assert environ .is_loaded
9798
9899 assert not environ .is_loaded
You can’t perform that action at this time.
0 commit comments