summaryrefslogtreecommitdiff
path: root/tests/test_utils.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix unit test that was failing when EDITOR environment variable was seteditorsTodd Leonhardt2020-11-211-2/+2
|
* Updated utils.find_editor() to include more Windows editorsKevin Van Brunt2020-11-191-49/+12
|
* feat(utils): probe editors in system pathMikhail Ushanov2020-11-171-0/+59
| | | | Signed-off-by: Mikhail Ushanov <gm.mephisto@gmail.com>
* Minor type hinting fixes.Eric Lin2020-09-111-0/+7
|
* Initial commit of table creation APIKevin Van Brunt2020-04-091-5/+40
|
* Allowing for colored fill char in align_textKevin Van Brunt2020-02-111-1/+10
| | | | Added function to index all style sequences found in a string
* Fixed bug where ANSI style sequences were not correctly handled in ↵Kevin Van Brunt2020-02-111-6/+37
| | | | utils.truncate_line()
* Added remove_settable() since cmd2 has add_settable()Kevin Van Brunt2020-02-051-0/+2
| | | | Documented Settable.onchange_cb
* Fixed a bug in a very unusual case and added some unit testsTodd Leonhardt2020-02-041-0/+19
|
* Updating unit tests and docsKevin Van Brunt2020-01-201-0/+15
|
* Renamed functionKevin Van Brunt2020-01-171-15/+15
|
* Updating unit testsKevin Van Brunt2020-01-171-1/+38
|
* Updating unit testsKevin Van Brunt2020-01-171-10/+17
|
* Renamed ansi_safe_wcswidth() to style_aware_wcswidth()Kevin Van Brunt2019-12-191-1/+1
| | | | Renamed ansi_aware_write() to style_aware_write()
* Renamed functions based on code review comments. Fixed Python warnings.Kevin Van Brunt2019-12-091-32/+32
|
* Added more unit tests for text alignmentKevin Van Brunt2019-12-091-10/+28
|
* Added more text alignment unit testsKevin Van Brunt2019-12-091-1/+8
|
* Adding unit tests for text alignment functionsKevin Van Brunt2019-12-091-16/+152
|
* Updated center_text to support ansi escape sequences and characters with ↵Kevin Van Brunt2019-12-091-14/+11
| | | | | | display widths greater than 1. Also added left and right justification functions.
* Fixed bug where pipe processes were not being stopped by Ctrl-C on WindowsKevin Van Brunt2019-11-181-9/+22
|
* Put an end time for timeout command just as a precautionKevin Van Brunt2019-11-121-2/+2
|
* Fixing unit tests that were causing problems on the test serversKevin Van Brunt2019-11-121-13/+4
|
* Fixing Windows unit test that hangs on AppVeyor due to a KeyboardInterruptKevin Van Brunt2019-11-121-2/+13
|
* Added unit testsKevin Van Brunt2019-07-241-0/+10
|
* Fixed a few commands that would have failed if arguments containing quotes ↵Kevin Van Brunt2019-07-241-1/+1
| | | | were used
* Skipping unit test on non-Windows because of unreliable behavior on TravisCI ↵Kevin Van Brunt2019-07-161-1/+2
| | | | and Azure DevOps platforms
* Moved RESET to end of color dictionaries and skip a test on Mac since it is ↵Todd Leonhardt2019-06-281-1/+2
| | | | unreliable on Azure DevOps CI
* Added unit tests for ansi.pyKevin Van Brunt2019-06-271-32/+0
|
* Changed signature of style() to allow for simpler calling and overriding of ↵Kevin Van Brunt2019-06-261-3/+3
| | | | settings in a provided TextStyle
* Added TextStyle class and default implementations for various message types ↵Kevin Van Brunt2019-06-261-3/+3
| | | | like Warning, Error, and Succes
* Moved code related to ANSI escape codes to new file called ansi.pyKevin Van Brunt2019-06-261-5/+6
|
* Renamed style_message to styleKevin Van Brunt2019-06-261-5/+5
|
* Removed end argument from style_messageKevin Van Brunt2019-06-251-2/+2
|
* Add 2 tests to test_utils.py for style_message()Daniel Ahn2019-06-251-1/+20
|
* Added center_text() utility function for centering text in a terminal along ↵Todd Leonhardt2019-06-161-0/+23
| | | | | | with unit tests for it This function isn't used yet, but I have plans to use it when improving the output of transcript testing
* Removed copyright headers from source files and updated LICENSE with current ↵Kevin Van Brunt2019-06-071-3/+0
| | | | year
* Added unit testKevin Van Brunt2019-04-251-11/+20
|
* Attempt to fix unit testsTodd Leonhardt2019-04-021-0/+3
|
* Added some unit tests for ProcReader and ContextFlag utility classesTodd Leonhardt2019-04-021-0/+51
|
* Replaced StdSim.__store_output with StdSim.pause_storageKevin Van Brunt2019-03-091-0/+22
|
* Increased code coverageKevin Van Brunt2019-01-241-1/+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
* Renamed display_width to ansi_safe_wcswidthKevin Van Brunt2018-11-161-2/+2
|
* Added wrapper for wcswidth that removes ansi escape charactersKevin Van Brunt2018-11-151-0/+5
|
* Added additional unit test for StdSimTodd Leonhardt2018-10-091-0/+12
|
* Added unit tests for new methods of StdSimTodd Leonhardt2018-10-031-0/+10
|
* Added a couple more unit tests for StdStimTodd Leonhardt2018-09-241-0/+12
|
* StdSim write methods now raise a TypeError exception if passed the wrong typeTodd Leonhardt2018-09-241-1/+44
| | | | | Also: - Added explicit unit tests for StdSim to test_utils.py
* Added unit tests for new utility functions and fixed a commentTodd Leonhardt2018-09-211-0/+35
|
* Add natural sorting (sorting case insensitively as well as numerically)Lance Starr2018-09-191-2/+28
|