Skip to content

Commit

Permalink
fix the incorrect process number in dryrun (#597)
Browse files Browse the repository at this point in the history
When the processes number is greater than items, the chunk_size
should be one, that is one time is assigned to one process.

Co-authored-by: Mikko Korpela <[email protected]>
  • Loading branch information
WendyInXian and mkorpela authored Nov 30, 2024
1 parent 4ec139e commit f6a6af8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pabot/pabot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1775,7 +1775,7 @@ def _create_execution_items_for_dry_run(
chunk_size = (
round(len(items) / processes_count)
if len(items) > processes_count
else len(items)
else 1
)
chunked_items = list(_chunk_items(items, chunk_size))
_NUMBER_OF_ITEMS_TO_BE_EXECUTED += len(chunked_items)
Expand Down

0 comments on commit f6a6af8

Please sign in to comment.