Right now, we print the summary for `./pants test`...
# general
Right now, we print the summary for
./pants test
like this at the end of every test run.
Copy code
src/python/pants/util/socket_test.py:tests                                      .....   SUCCESS
src/python/pants/util/filtering_test.py:tests                                   .....   FAILURE
src/python/pants/util/osutil_test.py:tests                                      .....   SUCCESS
src/python/pants/util/dirutil_test.py:tests                                     .....   FAILURE
src/python/pants/util/eval_test.py:tests                                        .....   SUCCESS
Instead, what do y’all think of aligning with the style that
use, like this?
Copy code
✓ src/python/pants/util/socket_test.py:tests succeeded.
𐄂 src/python/pants/util/filtering_test.py:tests failed.
✓ src/python/pants/util/osutil_test.py:tests succeeded.
𐄂 src/python/pants/util/dirutil_test.py:tests failed.
✓ src/python/pants/util/eval_test.py:tests succeeded.
(The actual test content will be printed above - this is only the summary at the end)
cc @happy-kitchen-89482
Personally, I’d prefer the latter so that Pants output is more consistent. This change also works much better if your terminal is narrow
It would be nice in either form to group likely relevant info last and thus closest to next CLI use. So, for test, grouping all failures last would be great. Now I can easily open a failure file or directory in an editor for example.
👍 3
Great suggestion. Would you want the same for fmt and lint, where you’re likely to never have more than 2-10 linters used?
First, sort by group (skipped vs failed vs succeeded). Then within each group, sort alphabetically
Afaict it's not that useful with fnt & lint since - today, the summary does not include file / directory info. With that included though, yes.
👍 1
I like the idea of grouping tests by succeeded/failed (and sorting alphanumerically within each group)
👍 1
But in terms of format, the current one (where the word SUCCESS/FAILURE is capitalized, and colored, and right-aligned) is probably good to keep even in that case, because it is more emphatic than the single character emoji icon
i’m not sure where the right alignment came from, but it’s kindof awkward
👍 1
while we’re bikeshedding, left aligning is seemingly easier to consume (i don’t have a strong preference for symbols vs words)
We went with the left alignment. I like the consistency + better wrapping for small terminals. And we still have the words “succeeded” and “failed” in order to be greppable