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

Adjust test result report width to terminal size #432

Merged
merged 1 commit into from
May 29, 2024

Conversation

Totktonada
Copy link
Member

Now the test configuration name is not trimmed if the terminal width allows it.

The idea can be illustrated this way:

+----------------------------------------------------------------------+
| Wide terminal                                                        |
+----------------------------------------------------------------------+
| suite/mytest_test.lua my_configuration                  [ pass ]     |
+----------------------------------------------------------------------+

+-------------------------------------------------+
| Narrow terminal                                 |
+-------------------------------------------------+
| suite/mytest_test.lua my_configur> [ pass ]     |
+-------------------------------------------------+

I want to add support for ability to run test cases as separate parallel tasks for luatest based tests with reporting of the test case name as a test configuration to the terminal. The test case names sometimes are quite long and it is convenient to see as much symbols from it as possible.

At the same time, the configuration name is stripped if the terminal has a low width. This way the output look good as on a wide as well as on a narrow terminal.

The feature works on Python 3.3+.

Now the test configuration name is not trimmed if the terminal width
allows it.

The idea can be illustrated this way:

```
+----------------------------------------------------------------------+
| Wide terminal                                                        |
+----------------------------------------------------------------------+
| suite/mytest_test.lua my_configuration                  [ pass ]     |
+----------------------------------------------------------------------+

+-------------------------------------------------+
| Narrow terminal                                 |
+-------------------------------------------------+
| suite/mytest_test.lua my_configur> [ pass ]     |
+-------------------------------------------------+
```

I want to add support for ability to run test cases as separate parallel
tasks for luatest based tests with reporting of the test case name as a
test configuration to the terminal. The test case names sometimes are
quite long and it is convenient to see as much symbols from it as
possible.

At the same time, the configuration name is stripped if the terminal has
a low width. This way the output look good as on a wide as well as on a
narrow terminal.

The feature works on Python 3.3+.
@Totktonada Totktonada requested a review from ochaplashkin May 27, 2024 14:58
@coveralls
Copy link

Coverage Status

coverage: 62.565% (+0.03%) from 62.54%
when pulling 35fddc8 on Totktonada/dynamic-test-report-width
into ed5b623 on master.

Copy link

@ochaplashkin ochaplashkin left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@ylobankov ylobankov merged commit 1724211 into master May 29, 2024
19 checks passed
@ylobankov ylobankov deleted the Totktonada/dynamic-test-report-width branch May 29, 2024 11:54
test-run.py Show resolved Hide resolved
test-run.py Show resolved Hide resolved
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.

5 participants