summaryrefslogtreecommitdiff
path: root/tests_isolated
Commit message (Collapse)AuthorAgeFilesLines
* Style changes from running black on Python 3.9Kevin Van Brunt2021-04-272-2/+2
|
* Replaced some pexcept() calls with perror().Kevin Van Brunt2021-04-021-1/+1
| | | | | | Converted some strings to f-strings. Fixed some grammar in error messages and docs. Increased code coverage.
* Refactored _perform_completion() to remove need for a cast() callKevin Van Brunt2021-04-021-7/+3
| | | | Changed CommandResult.stderr to a str instead of Optional[str]
* Resolves comments from PREric Lin2021-03-181-5/+83
|
* Some mypy validation fixesEric Lin2021-03-181-1/+1
|
* Added testsEric Lin2021-03-181-2/+98
|
* Merge branch 'master' into blackTodd Leonhardt2021-02-191-9/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # cmd2/__init__.py # cmd2/argparse_completer.py # cmd2/argparse_custom.py # cmd2/cmd2.py # cmd2/decorators.py # cmd2/exceptions.py # cmd2/utils.py # examples/arg_decorators.py # examples/argparse_completion.py # examples/modular_commands_main.py # tests/test_argparse_completer.py # tests/test_argparse_custom.py # tests/test_cmd2.py # tests/test_completion.py # tests/test_history.py
| * Merge branch 'master' into 2.0Kevin Van Brunt2021-01-224-14/+48
| |\
| * \ Merge branch 'master' into 2.0Kevin Van Brunt2020-09-172-0/+114
| |\ \
| * \ \ Merge branch '2.0' into read_inputKevin Van Brunt2020-09-031-8/+34
| |\ \ \
| | * \ \ Merge branch 'master' into 2.0Kevin Van Brunt2020-09-031-8/+34
| | |\ \ \
| * | | | | Refactored ArgparseCompleter to support custom completionKevin Van Brunt2020-09-011-1/+1
| |/ / / /
| * | | | Merge branch 'master' into 2.0Kevin Van Brunt2020-08-281-9/+9
| |\ \ \ \
| * \ \ \ \ Merge branch 'master' into 2.0Kevin Van Brunt2020-08-271-6/+6
| |\ \ \ \ \
| * \ \ \ \ \ Merge branch 'master' into 2.0Kevin Van Brunt2020-08-201-0/+62
| |\ \ \ \ \ \
| * | | | | | | Replaced choices_function / choices_method with choices_provider.Kevin Van Brunt2020-08-131-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaced completer_function / completer_method with completer. ArgparseCompleter now always passes cmd2.Cmd or CommandSet instance as the self argument to choices_provider and completer functions. Moved basic_complete from utils into cmd2.Cmd class. Moved CompletionError to exceptions.py
* | | | | | | | Add in isort changesTodd Leonhardt2021-01-313-8/+24
| | | | | | | |
* | | | | | | | Attempt to fix remaining black failuresTodd Leonhardt2021-01-311-1/+1
| | | | | | | |
* | | | | | | | Add black for automatic code formatTodd Leonhardt2021-01-314-39/+26
| |_|_|_|_|_|/ |/| | | | | |
* | | | | | | Changed isort to force wrapping of imports to reduce merge conflicts from ↵Eric Lin2021-01-224-14/+48
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | minor import changes.
* | | | | | Changes default category to be heritable by default - meaning that ↵Eric Lin2020-09-112-0/+114
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | subclasses will inherit the parent class's default category. Adds optional flag to disable heritability.
* | | | | Fixed type hints in example code1.3.9Kevin Van Brunt2020-09-031-1/+1
| | | | |
* | | | | Added CommandSet.on_unregistered()Kevin Van Brunt2020-09-031-2/+7
| | | | |
* | | | | Updated docsKevin Van Brunt2020-09-011-7/+6
| | | | |
* | | | | Added unit tests for CommandSet callbacksKevin Van Brunt2020-09-011-1/+22
| |_|_|/ |/| | |
* | | | Fixed issue where subcommand added with @as_subcommand_to decorator did not ↵Kevin Van Brunt2020-08-271-9/+9
| |_|/ |/| | | | | | | | | | | | | | 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 functions cmd2 adds to Namespaces (get_statement() and get_handler()) ↵Kevin Van Brunt2020-08-261-6/+6
| |/ |/| | | | | | | | | | | 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.
* | Added tests for invalid subcommandsEric Lin2020-08-201-0/+27
| |
* | Fixed AttributeError when CommandSet that uses as_subcommand_to decorator is ↵Kevin Van Brunt2020-08-191-0/+35
|/ | | | loaded during cmd2.Cmd.__init__().
* When passing a ns_provider to an argparse command, will now attempt to ↵Eric Lin2020-08-121-5/+29
| | | | resolve the correct CommandSet instance for self. If not, it'll fall back and pass in the cmd2 app
* Breaking change: Removed cmd2 app as a required second parameter toEric Lin2020-08-122-135/+112
| | | | | | CommandSet command functions (do_, complete_, help_). Renamed install_command_set and uninstall_command_set to register_command_set and unregister_command_set.
* Will now traverse down CommandSet inheritance tree to find all leaf descendants.1.3.2Eric Lin2020-08-101-5/+34
| | | | | | CommandSet now has a check to ensure it is only registered with one cmd2.Cmd instance at a time. Adds function to find command set by type and by command name
* Fixed prog value of subcommands added with as_subcommand_to() decorator.Kevin Van Brunt2020-08-071-2/+2
| | | | Fixed missing settings in subcommand parsers created with as_subcommand_to() decorator.
* Verify that a completer function is defined in a CommandSet beforeEric Lin2020-08-065-0/+1137
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