cliff/cliff/tests
Vitalii Kulanov 21914ed74b Add ability to sort data by columns for list commands
Very often there is a need to sort data by one or several
columns. This patch adds ability to do this by specifying
extra '-s/--sort-column' argument with respective columns:

  -s SORT_COLUMN, --sort-column SORT_COLUMN
                        specify the column(s) to sort the data
                        (columns specified first have a priority,
                        non-existing columns are ignored), can be
                        repeated

e.g.:

 * without sorting:

   foo_command bar_subcommand list
   +------+------+
   | Col1 | Col2 |
   +------+------+
   | a    | A    |
   | b    | B    |
   | c    | A    |
   +------+------+

 * with sorting:
   foo_command bar_subcommand list -s Col2 Col1
   +------+------+
   | Col1 | Col2 |
   +------+------+
   | a    | A    |
   | c    | A    |
   | b    | B    |
   +------+------+

Change-Id: Ifc6d6746448ff6f42898efd78ed3fd084a598a91
2017-12-27 16:07:45 +02:00
..
__init__.py Fix default encoding issue with python 2.6 2013-08-12 14:45:23 -04:00
base.py covert test suite to use testrepository 2017-04-23 10:16:30 -04:00
test_app.py Merge "Fix codec error when format=csv" 2017-12-04 15:48:15 +00:00
test_columns.py covert test suite to use testrepository 2017-04-23 10:16:30 -04:00
test_command.py make smart help formatter test deterministic 2017-06-30 17:01:33 +00:00
test_command_hooks.py Allow command hooks to make changes 2017-09-14 15:26:34 -05:00
test_commandmanager.py add support for legacy command name translation 2017-11-30 12:01:25 -05:00
test_complete.py covert test suite to use testrepository 2017-04-23 10:16:30 -04:00
test_formatters_csv.py covert test suite to use testrepository 2017-04-23 10:16:30 -04:00
test_formatters_json.py covert test suite to use testrepository 2017-04-23 10:16:30 -04:00
test_formatters_shell.py covert test suite to use testrepository 2017-04-23 10:16:30 -04:00
test_formatters_table.py Fix PEP8 in gate 2017-10-25 09:16:49 +07:00
test_formatters_value.py covert test suite to use testrepository 2017-04-23 10:16:30 -04:00
test_formatters_yaml.py covert test suite to use testrepository 2017-04-23 10:16:30 -04:00
test_help.py Fix PEP8 in gate 2017-10-25 09:16:49 +07:00
test_interactive.py Adjust completenames tests for cmd2 0.7.3+ 2017-06-28 07:45:44 +02:00
test_lister.py Add ability to sort data by columns for list commands 2017-12-27 16:07:45 +02:00
test_show.py covert test suite to use testrepository 2017-04-23 10:16:30 -04:00
test_sphinxext.py Fix regexp for detecting long options 2017-08-22 17:52:42 +00:00
test_utils.py covert test suite to use testrepository 2017-04-23 10:16:30 -04:00
utils.py Add Apache 2.0 license to source file 2016-10-10 13:43:09 +07:00