summaryrefslogtreecommitdiff
path: root/tests/test_ansi.py
Commit message (Collapse)AuthorAgeFilesLines
* Added unit test for ColorBase.colors()Kevin Van Brunt2020-02-071-0/+7
|
* Added __str__() back to ColorBase for more flexibility in its usageKevin Van Brunt2020-02-071-6/+18
| | | | Updated documentation and added unit tests
* Removed unnecessary methods from fg and bg color enumsTodd Leonhardt2020-02-071-12/+6
|
* Having two parallel datastructures each for foreground and background colors ↵Todd Leonhardt2020-02-061-5/+10
| | | | | | felt really clunky - now we just have one The Enum classes are now smart and deal with it all.
* Added convenience `ansi.fg` and `ansi.bg` enums of foreground and background ↵Todd Leonhardt2020-02-061-0/+14
| | | | | | colors which style() can now optionally use This is to make it easier to autocomplete color names in an IDE
* Added dim text style supportKevin Van Brunt2020-01-071-4/+13
|
* Renamed ansi_safe_wcswidth() to style_aware_wcswidth()Kevin Van Brunt2019-12-191-2/+2
| | | | Renamed ansi_aware_write() to style_aware_write()
* Changed allow_ansi to allow_style for accuracy in what types of ANSI escape ↵Kevin Van Brunt2019-12-191-2/+2
| | | | sequences are handled
* Whitespace and doc fixesKevin Van Brunt2019-07-011-1/+1
|
* Modified async_alert_str to also get passed the number of terminal columns ↵Todd Leonhardt2019-07-011-0/+11
| | | | and added unit tests for it
* Initial changes for encapsulation of colorama usage within ansi.pyTodd Leonhardt2019-06-301-13/+25
| | | | | | | | | | | | | | | Changes include: - ansi.py is now the only cmd2 code which depends on colorama - cmd2 tests no longer rely on colorama - Added new functions to ansi.py: - async_alert_str() - set_title_str - Added unit test for set_title_str TODO: - Refactor async_alert_str so cursor position is passed in and import from rl_utils is no longer required - Add unit test(s) for async_alert_str - Refactor FG_COLORS and BG_COLORS in ansi.py to not use constants from colorama
* Simplified ansi color dictionaries and lookup methodsTodd Leonhardt2019-06-271-10/+2
| | | | | | | Also: - Updated examples that use color to use cmd2.ansi instead of colorama - Updated tests that use color to use cmd2.ansi instead of colorama - plumbum_colorspy example shows how to override color lookup functions to use a different color library
* Added fg_lookup() and bg_lookup() two-stage color lookup functionsTodd Leonhardt2019-06-271-0/+26
|
* Added unit tests for ansi.pyKevin Van Brunt2019-06-271-0/+71