summaryrefslogtreecommitdiff
path: root/tests/test_pyscript.py
Commit message (Collapse)AuthorAgeFilesLines
* Renamed fileKevin Van Brunt2019-06-151-56/+0
|
* Updated unit testsKevin Van Brunt2019-06-151-4/+4
|
* Fixed unit testsKevin Van Brunt2019-06-151-6/+6
|
* Added unit testKevin Van Brunt2019-06-101-0/+14
|
* Added unit test for stdout capture in pyscriptKevin Van Brunt2019-04-231-0/+17
|
* Made run_cmd return out and errKevin Van Brunt2019-03-201-13/+7
|
* Removed ability to call commands as if they were functions in pyscript (e.g. ↵Kevin Van Brunt2019-02-281-234/+10
| | | | app.help())
* 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
* Fixed ArgparseFunctor to allow flag looking tokens in REMAINDER sectionsKevin Van Brunt2018-10-101-2/+3
|
* Added unit testsKevin Van Brunt2018-10-091-1/+18
|
* Using sub-command instead of subcommand where possible to be consistent with ↵Kevin Van Brunt2018-10-051-1/+1
| | | | argparse
* Converted help to argparseKevin Van Brunt2018-09-261-4/+4
|
* First steps in converting all commands to argparseKevin Van Brunt2018-09-261-1/+1
|
* Fixing unit testsKevin Van Brunt2018-09-251-1/+1
|
* Made small tweak to do_py to improve testabilityTodd Leonhardt2018-09-241-2/+2
|
* Fixed pyscript unit testsKevin Van Brunt2018-09-241-17/+13
|
* Fixed several hack classes build to simulate file descriptorsTodd Leonhardt2018-09-231-10/+10
| | | | | | | | | 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
* Suppresses stdout and stderr output by default when calling an application ↵Eric Lin2018-05-171-5/+31
| | | | | | | 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/+51
| | | | | | | 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.
* Added support for different argument modes and tests to validate.Eric Lin2018-05-011-16/+33
|
* Further customization of argparse applying patch submitted to ↵Eric Lin2018-04-301-0/+2
| | | | | | | https://bugs.python.org/issue15112 Added additional tests - now at 100% coverage of pyscript_bridge.py Still need handling of special action types: StoreTrue/False, store_const, count
* Added more tests exercising the pyscript bridge.Eric Lin2018-04-301-0/+30
|
* Added support for translating function positional and keyword arguments into ↵Eric Lin2018-04-281-0/+115
argparse command positional and flag arguments. Added initial set of tests