summaryrefslogtreecommitdiff
path: root/tests/test_cmd2.py
Commit message (Collapse)AuthorAgeFilesLines
* Added cmd2.exceptions.PassThroughExceptionexception_passthroughKevin Van Brunt2021-03-021-1/+16
|
* Deprecate Python 3.5Todd Leonhardt2021-02-201-8/+3
|
* Fixed black, isort, flake8, and doc8 issuesTodd Leonhardt2021-02-191-8/+9
|
* Merge branch 'master' into blackTodd Leonhardt2021-02-191-16/+36
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # 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-281-4/+13
| |\
| * | Removed --silent flag from alias/macro create since startup scripts can be ↵Kevin Van Brunt2021-01-221-14/+0
| | | | | | | | | | | | | | | | | | run silently. Removed --with_silent flag from alias/macro list since startup scripts can be run silently.
| * | Merge branch 'master' into 2.0Kevin Van Brunt2021-01-221-2/+13
| |\ \
| * \ \ Merge branch 'master' into 2.0Todd Leonhardt2020-11-211-18/+0
| |\ \ \
| * \ \ \ Merge branch 'master' into 2.0Todd Leonhardt2020-11-111-10/+28
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # CHANGELOG.md
| * \ \ \ \ Merge branch 'master' into 2.0Kevin Van Brunt2020-09-171-0/+30
| |\ \ \ \ \
| * | | | | | Updated unit tests for read_input()Kevin Van Brunt2020-09-051-0/+36
| | | | | | |
| * | | | | | Refactored complete() to handle custom behavior from read_input()Kevin Van Brunt2020-08-311-4/+4
| | | | | | |
* | | | | | | Add in isort changesTodd Leonhardt2021-01-311-5/+15
| | | | | | |
* | | | | | | Attempt to fix remaining black failuresTodd Leonhardt2021-01-311-4/+3
| | | | | | |
* | | | | | | Add black for automatic code formatTodd Leonhardt2021-01-311-66/+292
| |_|_|_|_|/ |/| | | | |
* | | | | | Added option to run startup scripts silentlyKevin Van Brunt2021-01-221-4/+13
| |_|_|_|/ |/| | | |
* | | | | Changed isort to force wrapping of imports to reduce merge conflicts from ↵Eric Lin2021-01-221-2/+12
| | | | | | | | | | | | | | | | | | | | minor import changes.
* | | | | Skip a test which is failing on Python 3.8 and 3.9 for now to fix a unit testTodd Leonhardt2021-01-211-0/+1
| |_|_|/ |/| | |
* | | | feat(utils): probe editors in system pathMikhail Ushanov2020-11-171-18/+0
| |_|/ |/| | | | | | | | Signed-off-by: Mikhail Ushanov <gm.mephisto@gmail.com>
* | | 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.
* | Added --silent flag to alias/macro create.Kevin Van Brunt2020-09-101-0/+30
| | | | | | | | Added --with_silent flag to alias/macro list.
* | Added unit tests for CommandSet callbacksKevin Van Brunt2020-09-011-4/+4
|/
* 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
* Marked with_arparser_and_unknown_args deprecated and consolidatedEric Lin2020-08-041-2/+2
| | | | implementation as an option to with_argparser instead.
* Removed pwarning() calls when command raises SystemExitKevin Van Brunt2020-05-281-0/+11
| | | | Added unit tests
* Added info on semantic versioning and branching strategy to CONTRIBUTING.mdTodd Leonhardt2020-04-241-4/+15
| | | | | | | 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
* 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_creatorTodd Leonhardt2020-04-151-26/+8
|\
| * Simplfied _redirect_output() by raising exception instead of returning boolKevin Van Brunt2020-04-111-26/+8
| |
* | Initial commit of table creation APIKevin Van Brunt2020-04-091-4/+2
|/
* Add unit tests for Ctrl-C stopping scripts/transcriptsKevin Van Brunt2020-03-261-0/+22
|
* do_shell() now saves the return code of the command it runs in ↵Kevin Van Brunt2020-03-201-0/+4
| | | | self.last_result for use in pyscripts
* Moved custom cmd2 exceptions to a separate file and removed them from public APITodd Leonhardt2020-02-181-2/+2
|
* Updated documentation and testsKevin Van Brunt2020-02-171-1/+8
|
* Fixed bug where pyscripts could edit cmd2.Cmd.py_locals dictionary.Kevin Van Brunt2020-02-141-6/+9
| | | | | | | | | Fixed bug where cmd2 set sys.path[0] for a pyscript to its cwd instead of the script's directory. Fixed bug where sys.path was not being restored after a pyscript ran. Setting the following pyscript variables: __name__: __main__ __file__: script path (as typed) Removed do_py.run() function since it didn't handle arguments and offered no benefit over run_pyscript.
* Renamed set command's -l/--long flag to -v/--verbose for consistency with ↵Kevin Van Brunt2020-02-101-2/+2
| | | | help and history commands
* Corrected issue where the actual new value was not always being printed in ↵Kevin Van Brunt2020-02-101-8/+11
| | | | | | | | do_set. Fixed do_set unit test. Made allow_ansi setter error message consistent with str_to_bool. Updated a docstring
* No longer displaying list of subcommands in usage text of alias and macroKevin Van Brunt2020-02-051-2/+2
|
* Added remove_settable() since cmd2 has add_settable()Kevin Van Brunt2020-02-051-1/+5
| | | | Documented Settable.onchange_cb
* Added support to do_set() for setting a parameter to an empty string as well ↵Kevin Van Brunt2020-02-051-1/+11
| | | | as something resembling an argparse flag (e.g. -h)
* Fixed a bug in a very unusual case and added some unit testsTodd Leonhardt2020-02-041-0/+7
|
* Updated CHANGELOG and made a few minor tweaksTodd Leonhardt2020-02-041-39/+0
|
* Updated set command to support tab completion of valuesKevin Van Brunt2020-02-041-26/+7
|
* Renamed locals_in_py to self_in_pyTodd Leonhardt2020-01-271-4/+4
| | | | This more accurately reflects what it controls
* Made three public attributes of cmd2.Cmd no longer settable at runtime by ↵Todd Leonhardt2020-01-271-6/+2
| | | | | | | | | end users The 3 attributes are: - continuation_prompt - locals_in_py - prompt
* Merge branch 'master' into ansi_to_styleKevin Van Brunt2019-12-191-45/+26
|\
| * Updating unit testsKevin Van Brunt2019-12-171-0/+15
| |
| * Updating unit testsKevin Van Brunt2019-12-171-45/+11
| |
* | Changed allow_ansi to allow_style for accuracy in what types of ANSI escape ↵Kevin Van Brunt2019-12-191-34/+34
|/ | | | sequences are handled