avocado.utils.astring: Add tabular_output() utility function
Add the tabular_output() API to avocado.utils.astring.
That function allows us to align a matrix (list of strings) properly
for output exhibition. This operation is heavily used in informational
plugins, such as the list and plugin list plugins.
As we generally want tests to come with new APIs, this
includes one simple unittest for it.
Changes from v1:
* Rename from matrix_to_str() to tabular_data(), suggested by rmoura
* Added a unittest.
Signed-off-by: NLucas Meneghel Rodrigues <lmr@redhat.com>
Showing
想要评论请 注册 或 登录