summaryrefslogtreecommitdiff
path: root/tests/scripts
Commit message (Collapse)AuthorAgeFilesLines
* Changed allow_ansi to allow_style for accuracy in what types of ANSI escape ↵Kevin Van Brunt2019-12-192-2/+2
| | | | sequences are handled
* Fixed issue where run_pyscript failed if the script's filename had a spaceKevin Van Brunt2019-07-232-14/+0
|
* More replacing of 'colors' with 'allow_ansi'Kevin Van Brunt2019-06-262-2/+2
|
* Fixing unit testsKevin Van Brunt2019-06-152-3/+3
|
* Fixed unit testsKevin Van Brunt2019-06-151-1/+1
|
* Added a unit test for "load -r"Todd Leonhardt2019-03-181-0/+1
|
* 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
* First pass at improved colorizingkotfu2018-08-112-2/+2
| | | | | - colors setting now allows Always, Terminal, Never values - poutput() and perror() honor these new settings
* Suppresses stdout and stderr output by default when calling an application ↵Eric Lin2018-05-171-0/+1
| | | | | | | command from pyscript. Added support for tab completing application commands in ipython shell Updated unit tests scripts to set cmd_echo to True to validate command output.
* Added support for customizing the pyscript bridge pystate object name.Eric Lin2018-05-021-1/+1
| | | | | | | Removed all legacy pystate objects. Changed default behavior to clear _last_result before each command Added utility for creating named tuples with default values Added tests to exercise new changes.
* Removed abbrev attributeKevin Van Brunt2018-03-022-2/+0
|
* Provide method to run multiple commands w/o a cmdloop.Alfred Levy2017-09-223-0/+8
| | | | | | | | | | | | runcmds_plus_hooks can accept multiple commands process the command queue to deal with subsequent commands loaded from scripts without requiring a command loop. This better supports a one-off batch processing scenario. Also fixed the insertion order of commands placed in the command queue by load and _relative_load so that script commands are run in the expected order. Minor tweak to setup instructions in CONTRIBUTING.md to include pyperclip in prerequisites.
* Added more unit tests for py and pyscript commandsTodd Leonhardt2017-07-012-0/+12
|
* Added unit testsKevin Van Brunt2017-06-303-0/+1
|
* Simplified implementation of do__relative_loadTodd Leonhardt2017-06-281-0/+1
Also removed default argument for _relative_load and load