summaryrefslogtreecommitdiff
path: root/tests/test_utils.py
Commit message (Collapse)AuthorAgeFilesLines
* Deprecate support for Python 3.6 and remove dependency on attrs (#1257)Todd Leonhardt2023-01-311-8/+3
| | | | | | | | | | | | | * Start deprecation of Python 3.6 * Removed dependency on attrs and replaced with dataclasses * Fix typing * Added comments to assist with dropping support of Python versions in the future. --------- Co-authored-by: Kevin Van Brunt <kmvanbrunt@gmail.com>
* Clean up spacingkotfu2022-11-051-1/+1
|
* Add tests for to_bool() when passing boolean valueskotfu2022-11-051-0/+5
|
* Enhance str_to_bool() to accept other typeskotfu2022-11-051-15/+23
| | | | | - Rename str_to_bool() -> to_bool() - Enhance to_bool() so that it accepts and converts bool, int, and float in addition to str
* Reduced amount of style characters carried over from previous lines when ↵Kevin Van Brunt2022-02-221-15/+142
| | | | | | | aligning text. Also reduced amount of style characters appended to truncated text. These changes were made to reduce memory usage in certain use cases of tables (e.g. nested colored tables).
* Added ability to colorize all aspects of BorderedTables and AlternatingTables.Kevin Van Brunt2021-10-191-13/+13
| | | | Refactored utils.align_text() to print less fill_char style characters.
* Added support for 8-bit/256-colors with the cmd2.EightBitFg and ↵Kevin Van Brunt2021-10-181-20/+23
| | | | | | | | | | | | | | cmd2.EightBitBg classes. Added support for 24-bit/RGB colors with the cmd2.RgbFg and cmd2.RgbBg classes. Removed dependency on colorama. Deprecated cmd2.fg. Use cmd2.Fg instead. Deprecated cmd2.bg. Use cmd2.Bg instead. Changed type of ansi.allow_style from a string to an ansi.AllowStyle Enum class. Fixed bug where using choices on a Settable didn't verify that a valid choice had been entered.
* Add in isort changesTodd Leonhardt2021-01-311-5/+16
|
* Add black for automatic code formatTodd Leonhardt2021-01-311-11/+75
|
* Changed isort to force wrapping of imports to reduce merge conflicts from ↵Eric Lin2021-01-221-2/+5
| | | | minor import changes.
* 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
|