summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix unit test that was failing when EDITOR environment variable was seteditorsTodd Leonhardt2020-11-211-2/+2
|
* Updated utils.find_editor() to include more Windows editorsKevin Van Brunt2020-11-191-49/+12
|
* feat(utils): probe editors in system pathMikhail Ushanov2020-11-172-18/+59
| | | | Signed-off-by: Mikhail Ushanov <gm.mephisto@gmail.com>
* Fixed bug where setting always_show_hint=True did not show a hint when ↵settable_hintKevin Van Brunt2020-11-121-0/+1
| | | | completing Settables
* Format multiline docstrings to match other help messagesBambu2020-10-091-0/+15
| | | | Changed cmd2 do_cmd to dedent docstrings using `pydoc.getdoc`. This patch provides output for docstrings that look like using argparse or a single line docstring
* Fixed issue where quoted redirectors and terminators in aliases and macros ↵Kevin Van Brunt2020-09-301-10/+13
| | | | | | were not being restored when read from a startup script.
* Merge branch 'master' into silenceKevin Van Brunt2020-09-171-0/+7
|\
| * Minor type hinting fixes.Eric Lin2020-09-111-0/+7
| |
* | Added --silent flag to alias/macro create.Kevin Van Brunt2020-09-101-0/+30
|/ | | | Added --with_silent flag to alias/macro list.
* argparse tab completion now groups flag names which run the same action. ↵Kevin Van Brunt2020-09-091-26/+44
| | | | | | Optional flags are wrapped in brackets like it is done in argparse usage text.
* Added always_show_hint settingKevin Van Brunt2020-09-053-11/+48
| | | | Fixed issue where flag names weren't always sorted correctly in argparse tab completion
* Added unit tests for CommandSet callbacksKevin Van Brunt2020-09-011-4/+4
|
* Fixed issue where subcommand added with @as_subcommand_to decorator did not ↵Kevin Van Brunt2020-08-271-9/+37
| | | | | | display help when called with -h/--help. 'add_help=False' no longer has to be passed to parsers used in @as_subcommand_to decorator.
* the with_argparse() decorator was incorrectly using a parsed statement ↵1.3.7Eric Lin2020-08-271-0/+17
| | | | object to search for the original function arguments. Switched to search for the original statement value instead
* The functions cmd2 adds to Namespaces (get_statement() and get_handler()) ↵Kevin Van Brunt2020-08-263-4/+13
| | | | | | | are now Cmd2AttributeWrapper objects named cmd2_statement and cmd2_handler. This makes it easy to filter out which attributes in an argparse.Namespace were added by cmd2.
* Fixed RecursionError when printing an argparse.Namespace caused by custom ↵Kevin Van Brunt2020-08-252-1/+24
| | | | | | attribute cmd2 was adding Added get_statement() function to argparse.Namespace which returns __statement__ attribute
* Added tests for invalid subcommandsEric Lin2020-08-201-0/+63
|
* Minor formatting changes. Fixed some inaccurate commentsEric Lin2020-08-201-19/+72
|
* Updated documentation with more explicit discussions on testingEric Lin2020-08-201-1/+14
| | | | Added unit test to verify command name validation updates.
* Fixed tab completion bug when using CompletionItem on an argument whose ↵Kevin Van Brunt2020-08-131-5/+73
| | | | metavar is a tuple
* Add unit test and update CHANGELOGTodd Leonhardt2020-08-121-0/+7
|
* Verify that a completer function is defined in a CommandSet beforeEric Lin2020-08-061-0/+83
| | | | | | | | | | passing it a CommandSet instance. Search for a CommandSet instance that matches the completer's parent class type.` Resolves Issue #967 Renamed isolated_tests directory to tests_isolated for better visual grouping. Added some exception documentation
* Marked with_arparser_and_unknown_args deprecated and consolidatedEric Lin2020-08-044-8/+9
| | | | implementation as an option to with_argparser instead.
* Moved commandset tests into an isolated testEric Lin2020-08-041-367/+0
|
* Sort imports using isortTodd Leonhardt2020-08-041-5/+2
|
* Added more command validation. Moved some common behavior into private ↵Eric Lin2020-08-041-9/+51
| | | | functions.
* Added explicit tests for dir and setattr. Minor type hinting changesEric Lin2020-08-041-0/+24
|
* Fixes issue with locating help_ annd complete_ functions when autoloading ↵Eric Lin2020-08-041-10/+136
| | | | | | command functions Adds handling of some edge cases. More thorough test coverage.
* add ability to remove commands and commandsetsEric Lin2020-08-042-3/+94
| | | | Issue #943
* Added new constructor parameter to flag whether commands should autoload. ↵Eric Lin2020-08-041-0/+86
| | | | | | Added unit tests. Moved installing commands into separate functions that can be called Issue #943
* Some minor cleanup of how imports work. Fixed issue with help documentation ↵Eric Lin2020-08-041-3/+9
| | | | | | for CommandSet commands. Issue #943
* Merge branch 'master' into hint_bugKevin Van Brunt2020-06-012-1/+69
|\
| * Removed pwarning() calls when command raises SystemExitKevin Van Brunt2020-05-282-1/+54
| | | | | | | | Added unit tests
| * Added SkipPostcommandHooks exception and made Cmd2ArgparseError inherit from it.Kevin Van Brunt2020-05-071-0/+15
| | | | | | | | Both exception classes have been added to the public API.
* | Changed how SimpleTable creates divider when divider_char is wide. It no ↵Kevin Van Brunt2020-06-011-28/+57
| | | | | | | | longer stretches the width of the table.
* | Added unit tests for base_width()Kevin Van Brunt2020-05-281-3/+54
| |
* | Updated argparse_completer to use TableCreator for the hint tableKevin Van Brunt2020-05-281-42/+52
|/
* Added info on semantic versioning and branching strategy to CONTRIBUTING.mdTodd Leonhardt2020-04-2413-21/+48
| | | | | | | Also: - Added isort to Pipenv dev - Added setup.cfg to make it easy to run flake8, doc8, and isort directly from the command line without using invoke - Ran isort to sort includes
* Updated _set_parser_prog() so future calls to add_parser() will set the ↵Kevin Van Brunt2020-04-231-1/+8
| | | | | | correct prog value This makes dynamically adding subcommands after the CLI starts easier.
* Fixed issue where subcommand usage text could contain a subcommand alias ↵Kevin Van Brunt2020-04-231-10/+52
| | | | instead of the actual name
* Fix unit test which made incorrect assumption that vi editor would exist on ↵Todd Leonhardt2020-04-231-8/+3
| | | | all Linux systems
* Merge branch 'master' into table_creatorKevin Van Brunt2020-04-221-5/+32
|\
| * Added unit tests for wrappers passing kwargs to command functionsKevin Van Brunt2020-04-211-5/+32
| |
* | Added unit tests for paddingKevin Van Brunt2020-04-221-0/+31
| |
* | Merge branch 'master' into table_creatorKevin Van Brunt2020-04-221-1/+1
|\ \ | |/
| * Updated error textKevin Van Brunt2020-04-201-1/+1
| |
| * cmd2 now considers ipy a pyscript environmentKevin Van Brunt2020-04-201-1/+1
| |
* | Merge branch 'master' into table_creatorTodd Leonhardt2020-04-151-26/+8
|\ \ | |/
| * Simplfied _redirect_output() by raising exception instead of returning boolKevin Van Brunt2020-04-111-26/+8
| |
* | Merge branch 'master' into table_creatorKevin Van Brunt2020-04-112-1/+17
|\ \ | |/