Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make collection progress output less verbose #901

Merged
merged 2 commits into from
May 12, 2023

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
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

src/xdist/dsession.py Outdated Show resolved Hide resolved
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.

src/xdist/dsession.py Show resolved Hide resolved
src/xdist/dsession.py Outdated Show resolved Hide resolved
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 added 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 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 <opensource@ronnypfannschmidt.de>
@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