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

Improve --hide-successes to not print headings for empty test subtrees #403

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

sergv
Copy link
Contributor

@sergv sergv commented Dec 6, 2023

Improve --hide-successes to not print headings for empty test subtrees (i.e. when -p filtered tests out).

This is again inspired by Emacs which cannot deal with escape sequence that moves cursor up one line. This change makes those movement unneeded since heading is not printed if there are no tests under it.

Should benefit everyone though since there's no point in printing only to delete afterwards, even if one wants to see progress - there's no progress being made in those empty subtrees that were filtered out.

This way console reporter will not need to print group headings when
group contains no tests, amoung other things.
@sergv
Copy link
Contributor Author

sergv commented Dec 10, 2023

Updated with different approach: instead of filtering out empty subtrees during printing, don't generate them in the first place in the foldTestTree.

@Bodigrim
Copy link
Collaborator

@martijnbastiaan could you possibly review this? I think it touches parts of tasty which you were involved with recently.

Copy link
Contributor

@martijnbastiaan martijnbastiaan left a comment

Choose a reason for hiding this comment

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

LGTM!

@Bodigrim Bodigrim merged commit ead27c2 into UnkindPartition:master Dec 11, 2023
13 checks passed
@sergv sergv deleted the improve-hide-successes branch December 11, 2023 22:39
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.

3 participants