diff options
Diffstat (limited to 'tests/test_utils.py')
-rw-r--r-- | tests/test_utils.py | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/tests/test_utils.py b/tests/test_utils.py index a4db3132..db43c292 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -8,43 +8,11 @@ import sys import pytest -from colorama import Fore, Back import cmd2.utils as cu -import cmd2.ansi as ansi HELLO_WORLD = 'Hello, world!' -def test_strip_ansi(): - base_str = HELLO_WORLD - ansi_str = Fore.GREEN + base_str + Fore.RESET - assert base_str != ansi_str - assert base_str == ansi.strip_ansi(ansi_str) - -def test_ansi_safe_wcswidth(): - base_str = HELLO_WORLD - ansi_str = Fore.GREEN + base_str + Fore.RESET - assert ansi.ansi_safe_wcswidth(ansi_str) != len(ansi_str) - -def test_style(): - base_str = HELLO_WORLD - ansi_str = Fore.BLUE + Back.GREEN + base_str + Fore.RESET + Back.RESET - assert ansi.style(base_str, fg='blue', bg='green') == ansi_str - -def test_style_color_not_exist(): - base_str = HELLO_WORLD - try: - ansi.style(base_str, fg='fake', bg='green') - assert False - except ValueError: - assert True - - try: - ansi.style(base_str, fg='blue', bg='fake') - assert False - except ValueError: - assert True - def test_strip_quotes_no_quotes(): base_str = HELLO_WORLD stripped = cu.strip_quotes(base_str) |