summaryrefslogtreecommitdiff
path: root/tests/test_plugin.py
Commit message (Collapse)AuthorAgeFilesLines
* Added cmd2.exceptions.PassThroughExceptionexception_passthroughKevin Van Brunt2021-03-021-2/+20
|
* Deprecate Python 3.5Todd Leonhardt2021-02-201-8/+3
|
* Add in isort changesTodd Leonhardt2021-01-311-1/+3
|
* Add black for automatic code formatTodd Leonhardt2021-01-311-7/+60
|
* Changed isort to force wrapping of imports to reduce merge conflicts from ↵Eric Lin2021-01-221-1/+6
| | | | minor import changes.
* The functions cmd2 adds to Namespaces (get_statement() and get_handler()) ↵Kevin Van Brunt2020-08-261-1/+1
| | | | | | | 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-251-1/+1
| | | | | | attribute cmd2 was adding Added get_statement() function to argparse.Namespace which returns __statement__ attribute
* Removed pwarning() calls when command raises SystemExitKevin Van Brunt2020-05-281-1/+43
| | | | 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.
* Added info on semantic versioning and branching strategy to CONTRIBUTING.mdTodd Leonhardt2020-04-241-2/+3
| | | | | | | 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
* Fixed docstringKevin Van Brunt2020-03-121-1/+1
|
* Added unit test for Cmd2ArgparseErrorKevin Van Brunt2020-03-121-1/+38
|
* Moved custom cmd2 exceptions to a separate file and removed them from public APITodd Leonhardt2020-02-181-3/+3
|
* Fixed unit testsKevin Van Brunt2019-06-121-12/+32
|
* Removed support for cmd.cmdqueueKevin Van Brunt2019-06-111-8/+8
| | | | allow_cli_args is now an argument to __init__ instead of a cmd2 class member
* Removed copyright headers from source files and updated LICENSE with current ↵Kevin Van Brunt2019-06-071-3/+0
| | | | year
* Added unit test for stdout capture in pyscriptKevin Van Brunt2019-04-231-2/+2
|
* Fix flake8 issuesTodd Leonhardt2018-12-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | This commit contains a very large number of trivial changes in order to fix flake8 errors and warnings. Predominantly these are whitespace changes. Additionally, the build for Python 3.7 on TravisCI has been tweaked to fail if there are any flake8 errors using the following commandline: * flake8 . --count --ignore=E252 --max-complexity=31 --max-line-length=127 --show-source --statistics NOTE: In the future the max cyclomatic complexity should be lowered, but some improvements need to be made first. One flake8 error is being ignored entirely: * E252 missing whitespace around parameter equals * ignored because it doesn't correctly deal with default argument values after a type hint A few flake8 errors are being selectively ignored in certain files: * C901 fuction is too complex * ignored in argparse_completer.py because the complex code is an override of argparse complexity * E302 expected 2 blank lines after ... * ignored in all unit test files for convenience * F401 module imported but unused * ignored in cmd2/__init__.py because imports are for convenience of cmd2 developers and backwards compatibility * F821 undefined name * ignored in cmd2 script files which are intended to run only within cmd2 applications via pyscript where "app" and "cmd" are defined
* Deleted the hook methods which were deprecated in the previous releaseTodd Leonhardt2018-09-251-2/+3
| | | | | | | | | The following methods of cmd2.Cmd have been deleted: - preparse - postparsing_precmd - postparsing_postcmd The new application lifecycle hook framework allows for registering callbacks to be called at various points in the application lifecycle and is more powerful and flexible than the old system of fixed hook methods.
* Fixed several hack classes build to simulate file descriptorsTodd Leonhardt2018-09-231-39/+35
| | | | | | | | | Now there is a single class, StdSim in utils.py, which is intended to simulate stdout and stderr file objects. This class replaced the following: - pyscript_bridge.py::CopyStream - transcript.py::OutputTrap - conftest.py::StdOut
* Fix for #417, call preparse()kotfu2018-07-151-0/+24
|
* Add command finalization hookskotfu2018-07-051-3/+139
|
* Postcommand hooks implementedkotfu2018-06-221-26/+172
|
* Revise precommand hooks to use `data` parameterkotfu2018-06-211-7/+7
|
* Use `data` instead of `params`kotfu2018-06-211-12/+12
|
* Revised postparsing hookskotfu2018-06-211-6/+52
|
* add comment headers to better organize codekotfu2018-06-031-0/+11
|
* preloop and postloop hooks must declare None return typekotfu2018-06-031-16/+16
|
* Preloop and postloop hooks now validate signaturekotfu2018-06-031-0/+28
|
* Precommand hooks now check typing of passed callableskotfu2018-06-031-2/+57
|
* Begin converting precmd to passing and returning a data objectkotfu2018-06-031-2/+3
|
* Tests for precmd hookskotfu2018-05-311-41/+184
|
* implement precommand and postcommand hookskotfu2018-05-271-7/+13
|
* Add preloop and postloop hook capabilitieskotfu2018-05-261-0/+48
|
* Document and test postparsing hookskotfu2018-05-261-0/+179