6
6
import pytest
7
7
from _pytask .live import LiveExecution
8
8
from _pytask .live import LiveManager
9
+ from _pytask .logging_utils import TaskExecutionStatus
9
10
from pytask import ExecutionReport
10
11
from pytask import ExitCode
11
12
from pytask import Task
@@ -41,7 +42,7 @@ def test_live_execution_sequentially(capsys, tmp_path):
41
42
)
42
43
43
44
live_manager .start ()
44
- live .update_running_tasks (task )
45
+ live .update_running_tasks (task , status = TaskExecutionStatus . RUNNING )
45
46
live_manager .pause ()
46
47
47
48
# Test pause removes the table.
@@ -99,7 +100,7 @@ def test_live_execution_displays_skips_and_persists(capsys, tmp_path, verbose, o
99
100
)
100
101
101
102
live_manager .start ()
102
- live .update_running_tasks (task )
103
+ live .update_running_tasks (task , status = TaskExecutionStatus . RUNNING )
103
104
live_manager .pause ()
104
105
105
106
report = ExecutionReport (task = task , outcome = outcome , exc_info = None )
@@ -149,7 +150,7 @@ def test_live_execution_displays_subset_of_table(capsys, tmp_path, n_entries_in_
149
150
)
150
151
151
152
live_manager .start ()
152
- live .update_running_tasks (running_task )
153
+ live .update_running_tasks (running_task , status = TaskExecutionStatus . RUNNING )
153
154
live_manager .stop (transient = False )
154
155
155
156
captured = capsys .readouterr ()
@@ -161,7 +162,7 @@ def test_live_execution_displays_subset_of_table(capsys, tmp_path, n_entries_in_
161
162
162
163
completed_task = Task (base_name = "task_completed" , path = path , function = lambda x : x )
163
164
completed_task .name = "task_module.py::task_completed"
164
- live .update_running_tasks (completed_task )
165
+ live .update_running_tasks (completed_task , status = TaskExecutionStatus . RUNNING )
165
166
report = ExecutionReport (
166
167
task = completed_task , outcome = TaskOutcome .SUCCESS , exc_info = None
167
168
)
@@ -202,7 +203,7 @@ def test_live_execution_skips_do_not_crowd_out_displayed_tasks(capsys, tmp_path)
202
203
)
203
204
204
205
live_manager .start ()
205
- live .update_running_tasks (task )
206
+ live .update_running_tasks (task , status = TaskExecutionStatus . RUNNING )
206
207
live_manager .stop ()
207
208
208
209
# Test table with running task.
@@ -224,9 +225,9 @@ def test_live_execution_skips_do_not_crowd_out_displayed_tasks(capsys, tmp_path)
224
225
tasks .append (skipped_task )
225
226
226
227
live_manager .start ()
227
- live .update_running_tasks (successful_task )
228
+ live .update_running_tasks (successful_task , status = TaskExecutionStatus . RUNNING )
228
229
for task in tasks :
229
- live .update_running_tasks (task )
230
+ live .update_running_tasks (task , status = TaskExecutionStatus . RUNNING )
230
231
live_manager .stop ()
231
232
232
233
captured = capsys .readouterr ()
0 commit comments