File tree Expand file tree Collapse file tree 3 files changed +3
-5
lines changed Expand file tree Collapse file tree 3 files changed +3
-5
lines changed Original file line number Diff line number Diff line change 12
12
@hookimpl
13
13
def pytask_parse_config (config : dict [str , Any ]) -> None :
14
14
"""Parse the configuration."""
15
- if config ["n_workers" ] == "auto" : # noqa: PLR2004
15
+ if config ["n_workers" ] == "auto" :
16
16
config ["n_workers" ] = max (os .cpu_count () - 1 , 1 )
17
17
18
18
if (
Original file line number Diff line number Diff line change @@ -59,12 +59,10 @@ def pytask_execute_build(session: Session) -> bool | None:
59
59
parallel_backend = PARALLEL_BACKENDS [session .config ["parallel_backend" ]]
60
60
61
61
with parallel_backend (max_workers = session .config ["n_workers" ]) as executor :
62
-
63
62
session .config ["_parallel_executor" ] = executor
64
63
sleeper = _Sleeper ()
65
64
66
65
while session .scheduler .is_active ():
67
-
68
66
try :
69
67
newly_collected_reports = []
70
68
n_new_tasks = session .config ["n_workers" ] - len (running_tasks )
Original file line number Diff line number Diff line change @@ -209,9 +209,9 @@ def task_5():
209
209
210
210
assert session .exit_code == ExitCode .OK
211
211
first_task_name = session .execution_reports [0 ].task .name
212
- assert first_task_name .endswith ("task_0" ) or first_task_name . endswith ( "task_3" )
212
+ assert first_task_name .endswith (( "task_0" , "task_3" ) )
213
213
last_task_name = session .execution_reports [- 1 ].task .name
214
- assert last_task_name .endswith ("task_2" ) or last_task_name . endswith ( "task_5" )
214
+ assert last_task_name .endswith (( "task_2" , "task_5" ) )
215
215
216
216
217
217
@pytest .mark .end_to_end ()
You can’t perform that action at this time.
0 commit comments