66import  pytest 
77from  _pytask .live  import  LiveExecution 
88from  _pytask .live  import  LiveManager 
9+ from  _pytask .logging_utils  import  TaskExecutionStatus 
910from  pytask  import  ExecutionReport 
1011from  pytask  import  ExitCode 
1112from  pytask  import  Task 
@@ -41,7 +42,7 @@ def test_live_execution_sequentially(capsys, tmp_path):
4142    )
4243
4344    live_manager .start ()
44-     live .update_running_tasks (task )
45+     live .add_task (task ,  status = TaskExecutionStatus . RUNNING )
4546    live_manager .pause ()
4647
4748    # Test pause removes the table. 
@@ -69,7 +70,7 @@ def test_live_execution_sequentially(capsys, tmp_path):
6970    report  =  ExecutionReport (task = task , outcome = TaskOutcome .SUCCESS , exc_info = None )
7071
7172    live_manager .resume ()
72-     live .update_reports (report )
73+     live .update_report (report )
7374    live_manager .stop ()
7475
7576    # Test final table with reported outcome. 
@@ -99,13 +100,13 @@ def test_live_execution_displays_skips_and_persists(capsys, tmp_path, verbose, o
99100    )
100101
101102    live_manager .start ()
102-     live .update_running_tasks (task )
103+     live .add_task (task ,  status = TaskExecutionStatus . RUNNING )
103104    live_manager .pause ()
104105
105106    report  =  ExecutionReport (task = task , outcome = outcome , exc_info = None )
106107
107108    live_manager .resume ()
108-     live .update_reports (report )
109+     live .update_report (report )
109110    live_manager .stop ()
110111
111112    # Test final table with reported outcome. 
@@ -149,7 +150,7 @@ def test_live_execution_displays_subset_of_table(capsys, tmp_path, n_entries_in_
149150    )
150151
151152    live_manager .start ()
152-     live .update_running_tasks (running_task )
153+     live .add_task (running_task ,  status = TaskExecutionStatus . RUNNING )
153154    live_manager .stop (transient = False )
154155
155156    captured  =  capsys .readouterr ()
@@ -161,13 +162,13 @@ def test_live_execution_displays_subset_of_table(capsys, tmp_path, n_entries_in_
161162
162163    completed_task  =  Task (base_name = "task_completed" , path = path , function = lambda  x : x )
163164    completed_task .name  =  "task_module.py::task_completed" 
164-     live .update_running_tasks (completed_task )
165+     live .add_task (completed_task ,  status = TaskExecutionStatus . RUNNING )
165166    report  =  ExecutionReport (
166167        task = completed_task , outcome = TaskOutcome .SUCCESS , exc_info = None 
167168    )
168169
169170    live_manager .resume ()
170-     live .update_reports (report )
171+     live .update_report (report )
171172    live_manager .stop ()
172173
173174    # Test that report is or is not included. 
@@ -202,7 +203,7 @@ def test_live_execution_skips_do_not_crowd_out_displayed_tasks(capsys, tmp_path)
202203    )
203204
204205    live_manager .start ()
205-     live .update_running_tasks (task )
206+     live .add_task (task ,  status = TaskExecutionStatus . RUNNING )
206207    live_manager .stop ()
207208
208209    # Test table with running task. 
@@ -224,9 +225,9 @@ def test_live_execution_skips_do_not_crowd_out_displayed_tasks(capsys, tmp_path)
224225        tasks .append (skipped_task )
225226
226227    live_manager .start ()
227-     live .update_running_tasks (successful_task )
228+     live .add_task (successful_task ,  status = TaskExecutionStatus . RUNNING )
228229    for  task  in  tasks :
229-         live .update_running_tasks (task )
230+         live .add_task (task ,  status = TaskExecutionStatus . RUNNING )
230231    live_manager .stop ()
231232
232233    captured  =  capsys .readouterr ()
@@ -239,10 +240,10 @@ def test_live_execution_skips_do_not_crowd_out_displayed_tasks(capsys, tmp_path)
239240    report  =  ExecutionReport (
240241        task = successful_task , outcome = TaskOutcome .SUCCESS , exc_info = None 
241242    )
242-     live .update_reports (report )
243+     live .update_report (report )
243244    for  task  in  tasks :
244245        report  =  ExecutionReport (task = task , outcome = TaskOutcome .SKIP , exc_info = None )
245-         live .update_reports (report )
246+         live .update_report (report )
246247    live_manager .stop ()
247248
248249    # Test final table with reported outcome. 
0 commit comments