summaryrefslogtreecommitdiff
path: root/isolated_tests
Commit message (Collapse)AuthorAgeFilesLines
* Verify that a completer function is defined in a CommandSet beforeEric Lin2020-08-064-934/+0
| | | | | | | | | | 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-041-1/+1
| | | | implementation as an option to with_argparser instead.
* Minor formatting fixes. Injecting a function into namespace objects before ↵Eric Lin2020-08-041-17/+23
| | | | passing to command handlers to access sub-command handlers
* Now maintains a command->CommandSet mapping and passes the CommandSetanselor2020-08-041-25/+371
| | | | | | | | | | | | | | | through to the ArgparseCompleter if one is registered. For subcommands, the registered argparse instance for the subcommand is now tagged with the CommandSet from which it originated. If a CommandSet is detected, it's now passed in as 'self' for the completion functions. Fixes some issue found with removing a subcommand. Adds additional tests. Added a check to prevent removal of a CommandSet if it has commands with sub-commands from another CommandSet bound to it. Documentation improvements. Standardized around using CommandSetRegistrationException during commandset install/uninstall related errors. Added support for nested sub-command injection.
* Removed sub-class and instead patch argparse._SubParsersActionEric Lin2020-08-041-1/+1
|
* Suggested PR Fixes.Eric Lin2020-08-041-1/+1
| | | | | sub-commande => subcommand Added help/aliases to `as_subcommand_to` decorator.
* Adds unit tests for sub-commands and additional commandset edge casesEric Lin2020-08-041-0/+170
|
* updated importsEric Lin2020-08-042-1/+0
| | | | Added additional documentation
* Updates the example to remove usage of the now remove ability toEric Lin2020-08-041-18/+72
| | | | | | | | | | register arbitrary functions as commands. Added example that demonstrates use of each of the command decorators with CommandSets. Adds unit test that verifies that CommandSets containing decorators load and process commands correctly. Updated the constructor declaration for Cmd2ArgumentParser to explicitly re-declare argparse constructor parameters.
* Removed support for functions outside of CommandSetsEric Lin2020-08-041-208/+1
|
* Moved commandset tests into an isolated testEric Lin2020-08-043-0/+566