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 sergv force-pushed the improve-hide-successes branch from 4c4d899 to cbab6ba Compare December 10, 2023 12:19
@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
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Jan 29, 2025
Version 1.5.3
--------------

_2025-01-05_

* Console reporter: disable line wrapping
  ([#433](UnkindPartition/tasty#433)).
* Console reporter: force flushing of stdout after `showCursor`
  ([#436](UnkindPartition/tasty#436)).

Version 1.5.2
--------------

_2024-11-03_

* Partially revert [#393](UnkindPartition/tasty#393)
  to fix progress reporting outside of Emacs.
* Do not depend on `unbounded-delays` on `ppc64`, `s390x` and `riscv64`
  ([#371](UnkindPartition/tasty#371),
   [#422](UnkindPartition/tasty#422),
   [#423](UnkindPartition/tasty#423)).


Version 1.5.1
--------------

_2024-06-22_

* Performance improvements
  ([#389](UnkindPartition/tasty#389),
   [#390](UnkindPartition/tasty#390)).
* Progress reporting in Emacs: use `\r` instead of ANSI escape sequences
  ([#393](UnkindPartition/tasty#393)).
* Console reporter: fix unintended change to `foldHeading`
  ([#396](UnkindPartition/tasty#396)).
* Prune empty test subtrees from `TestTree`
  ([#403](UnkindPartition/tasty#403)).
* Add `instance Eq Timeout` and `instance Ord Timeout`
  ([#415](UnkindPartition/tasty#415)).
* Add ability to supply options for launchers and reporters at the top-level of test tree
  ([#417](UnkindPartition/tasty#417)).
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