Skip to content

Comments

Make collection progress output less verbose#901

Merged
nicoddemus merged 2 commits intopytest-dev:masterfrom
nicoddemus:555-improved-col-progress
May 12, 2023
Merged

Make collection progress output less verbose#901
nicoddemus merged 2 commits intopytest-dev:masterfrom
nicoddemus:555-improved-col-progress

Conversation

@nicoddemus
Copy link
Member

Fix #555

@nicoddemus nicoddemus force-pushed the 555-improved-col-progress branch 2 times, most recently from 0839436 to 6cc3a39 Compare May 10, 2023 23:04
@nicoddemus nicoddemus force-pushed the 555-improved-col-progress branch from 6cc3a39 to d292e82 Compare May 10, 2023 23:09
Copy link
Member

@bluetech bluetech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 from me

statuses = [s for s, c in status_and_items]
total_workers = len(statuses)
workers_noun = "worker" if total_workers == 1 else "workers"
if status_and_items and all(s == WorkerStatus.CollectionDone for s in statuses):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is not status_and_items possible?

Copy link
Member Author

@nicoddemus nicoddemus May 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the current design not really, but given the type cannot prevent that, I thought better guard against that, because all([]) returns True and will break on the next line -- the first parametrization of test_get_workers_status_line checks that.

Copy link
Member

@RonnyPfannschmidt RonnyPfannschmidt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a little gnarly, but the ux is no longer 🎊

@nicoddemus nicoddemus merged commit be1d5c4 into pytest-dev:master May 12, 2023
@nicoddemus nicoddemus deleted the 555-improved-col-progress branch May 12, 2023 13:36
nicoddemus pushed a commit to nicoddemus/pytest-xdist that referenced this pull request May 18, 2023
Hopefully this fixes pytest-dev#907, as seems this is the only
change in pytest-dev#901 which is somehow related.
nicoddemus pushed a commit to nicoddemus/pytest-xdist that referenced this pull request May 18, 2023
Hopefully this fixes pytest-dev#907, as seems this is the only
change in pytest-dev#901 which is somehow related.
nicoddemus added a commit that referenced this pull request May 19, 2023
Hopefully this fixes #907, as seems this is the only
change in #901 which is somehow related.

---------

Co-authored-by: Ronny Pfannschmidt <[email protected]>
@adamchainz
Copy link
Member

Thank you ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Revamp progress output when collecting workers

4 participants