@@ -20,7 +20,7 @@ def test_can_run_with_default_values(self, mock_ex, mock_sleep, mock_run, mock_n
20
20
universal_newlines = True , shell = True
21
21
)
22
22
mock_sleep .assert_called_with (1 )
23
- mock_ex .assert_called_with (os .path .abspath ("." ), os .path .abspath ("." ), mock_nc .return_value , None , 0 )
23
+ mock_ex .assert_called_with (os .path .abspath ("." ), os .path .abspath ("." ), mock_nc .return_value , None , 0 , None )
24
24
self .assertEqual (executions , [execution ])
25
25
26
26
@@ -46,7 +46,7 @@ def test_can_run_with_custom_values(self, mock_ex, mock_sleep, mock_wait, mock_r
46
46
mock_wait .assert_called_with ("/log" , datetime (2025 , 1 , 1 ))
47
47
mock_sleep .assert_called_with (4 )
48
48
self .assertEqual (mock_sleep .call_count , 3 )
49
- mock_ex .assert_called_with ("/out" , "/log" , mock_nc .return_value , mock_executions [0 ], 40 )
49
+ mock_ex .assert_called_with ("/out" , "/log" , mock_nc .return_value , mock_executions [0 ], 40 , "UTC" )
50
50
self .assertEqual (mock_ex .call_count , 3 )
51
51
self .assertEqual (executions , [mock_executions [1 ]])
52
52
@@ -67,7 +67,7 @@ def test_can_run_and_poll(self, mock_ex, mock_sleep, mock_run, mock_nc):
67
67
)
68
68
mock_sleep .assert_called_with (1 )
69
69
self .assertEqual (mock_sleep .call_count , 3 )
70
- mock_ex .assert_called_with ("/out" , "/out" , mock_nc .return_value , mock_executions [0 ], 60 )
70
+ mock_ex .assert_called_with ("/out" , "/out" , mock_nc .return_value , mock_executions [0 ], 60 , None )
71
71
self .assertEqual (mock_ex .call_count , 3 )
72
72
self .assertEqual (executions , mock_executions )
73
73
@@ -84,7 +84,7 @@ def test_can_run_with_custom_runner(self, mock_ex, mock_sleep, mock_run, mock_nc
84
84
self .assertFalse (mock_run .called )
85
85
runner .assert_called_with (mock_nc .return_value )
86
86
mock_sleep .assert_called_with (1 )
87
- mock_ex .assert_called_with (os .path .abspath ("." ), os .path .abspath ("." ), mock_nc .return_value , None , 0 )
87
+ mock_ex .assert_called_with (os .path .abspath ("." ), os .path .abspath ("." ), mock_nc .return_value , None , 0 , None )
88
88
self .assertEqual (executions , [mock_ex .return_value [0 ]])
89
89
90
90
@@ -324,17 +324,17 @@ def test_can_get_first_execution(self, mock_update, mock_paths, mock_init, mock_
324
324
"cc/dd" : "/ex/cc/dd" ,
325
325
"gg/hh" : "/ex/gg/hh" ,
326
326
}
327
- execution , size = get_execution ("/ex" , "/log" , "nf run" )
327
+ execution , size = get_execution ("/ex" , "/log" , "nf run" , timezone = "UTC" )
328
328
self .assertEqual (execution , mock_execution )
329
329
self .assertEqual (size , 3 )
330
330
mock_text .assert_called_with (os .path .join ("/log" , ".nextflow.log" ))
331
331
mock_make .assert_called_with ("LOG" , "/ex" , "nf run" , None )
332
332
mock_init .assert_called_with ("LOG" , mock_execution )
333
333
mock_paths .assert_called_with (["cc/dd" ,"gg/hh" ], "/ex" )
334
334
self .assertEqual ([c [0 ] for c in mock_update .call_args_list ], [
335
- (process_executions ["aa/bb" ], "/ex" ),
336
- (process_executions ["ee/ff" ], "/ex" ),
337
- (process_executions ["gg/hh" ], "/ex" ),
335
+ (process_executions ["aa/bb" ], "/ex" , "UTC" ),
336
+ (process_executions ["ee/ff" ], "/ex" , "UTC" ),
337
+ (process_executions ["gg/hh" ], "/ex" , "UTC" ),
338
338
])
339
339
self .assertEqual (execution .process_executions , [
340
340
process_executions ["aa/bb" ],
@@ -364,17 +364,17 @@ def test_can_get_subsequent_execution(self, mock_update, mock_paths, mock_init,
364
364
"cc/dd" : "/ex/cc/dd" ,
365
365
"gg/hh" : "/ex/gg/hh" ,
366
366
}
367
- execution , size = get_execution ("/ex" , "/log" , "nf run" , mock_execution , 4 )
367
+ execution , size = get_execution ("/ex" , "/log" , "nf run" , mock_execution , 4 , "UTC" )
368
368
self .assertEqual (execution , mock_execution )
369
369
self .assertEqual (size , 3 )
370
370
mock_text .assert_called_with (os .path .join ("/log" , ".nextflow.log" ))
371
371
mock_make .assert_called_with ("LOG" , "/ex" , "nf run" , mock_execution )
372
372
mock_init .assert_called_with ("LOG" , mock_execution )
373
373
mock_paths .assert_called_with (["cc/dd" ,"gg/hh" ], "/ex" )
374
374
self .assertEqual ([c [0 ] for c in mock_update .call_args_list ], [
375
- (process_executions ["aa/bb" ], "/ex" ),
376
- (process_executions ["ee/ff" ], "/ex" ),
377
- (process_executions ["gg/hh" ], "/ex" ),
375
+ (process_executions ["aa/bb" ], "/ex" , "UTC" ),
376
+ (process_executions ["ee/ff" ], "/ex" , "UTC" ),
377
+ (process_executions ["gg/hh" ], "/ex" , "UTC" ),
378
378
])
379
379
self .assertEqual (execution .process_executions , [
380
380
process_executions ["aa/bb" ],
@@ -633,7 +633,7 @@ def test_can_update_values(self, mock_text):
633
633
def test_can_update_values_with_started (self , mock_time , mock_text ):
634
634
proc_ex = Mock (stdout = "." , stderr = "." , bash = "." , finished = None , return_code = "" , path = "aa/bb" , started = None , execution = Mock (finished = None ), cached = False )
635
635
mock_text .side_effect = ["ok" , "bad" ]
636
- update_process_execution_from_path (proc_ex , "/ex" )
636
+ update_process_execution_from_path (proc_ex , "/ex" , timezone = "UTC" )
637
637
self .assertEqual (proc_ex .stdout , "ok" )
638
638
self .assertEqual (proc_ex .stderr , "bad" )
639
639
self .assertEqual (proc_ex .bash , "." )
@@ -643,7 +643,7 @@ def test_can_update_values_with_started(self, mock_time, mock_text):
643
643
call (os .path .join ("/ex" , "work" , "aa/bb" , ".command.out" ),),
644
644
call (os .path .join ("/ex" , "work" , "aa/bb" , ".command.err" ),),
645
645
])
646
- mock_time .assert_called_with (os .path .join ("/ex" , "work" , "aa/bb" , ".command.begin" ))
646
+ mock_time .assert_called_with (os .path .join ("/ex" , "work" , "aa/bb" , ".command.begin" ), "UTC" )
647
647
648
648
649
649
@patch ("nextflow.command.get_file_text" )
0 commit comments