tarantool / test-run

Tarantool functional testing framework
14 stars 15 forks source link

Adjust test result report width to terminal size #432

Closed Totktonada closed 4 months ago

Totktonada commented 4 months ago

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

coveralls commented 4 months ago

Coverage Status

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