summaryrefslogtreecommitdiff
path: root/tests/test_utils.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2019-06-29 14:13:55 -0400
committerGitHub <noreply@github.com>2019-06-29 14:13:55 -0400
commitd9ec6f775335133f7b9dc5c33c76eac942243397 (patch)
tree20a2ef40c3e1868accb97201fc0b5ea913cb0878 /tests/test_utils.py
parentbef07746e33da9def33d814913891384a545a95c (diff)
parent83e418844cbf72250d180d9c529b5ec44c4e7d3d (diff)
downloadcmd2-git-d9ec6f775335133f7b9dc5c33c76eac942243397.tar.gz
Merge pull request #704 from python-cmd2/feature/revisit-color-support
#698 - Revisiting Color Support
Diffstat (limited to 'tests/test_utils.py')
-rw-r--r--tests/test_utils.py15
1 files changed, 2 insertions, 13 deletions
diff --git a/tests/test_utils.py b/tests/test_utils.py
index 44421b93..262e6c54 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -8,23 +8,11 @@ import sys
import pytest
-from colorama import Fore
import cmd2.utils as cu
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 == cu.strip_ansi(ansi_str)
-
-def test_ansi_safe_wcswidth():
- base_str = HELLO_WORLD
- ansi_str = Fore.GREEN + base_str + Fore.RESET
- assert cu.ansi_safe_wcswidth(ansi_str) != len(ansi_str)
-
def test_strip_quotes_no_quotes():
base_str = HELLO_WORLD
stripped = cu.strip_quotes(base_str)
@@ -257,7 +245,8 @@ def test_proc_reader_terminate(pr_none):
else:
assert ret_code == -signal.SIGTERM
-@pytest.mark.skipif(sys.platform == 'linux', reason="Test doesn't work correctly on TravisCI")
+@pytest.mark.skipif(not sys.platform.startswith('win'),
+ reason="Test doesn't work correctly on TravisCI and is unreliable on Azure DevOps macOS")
def test_proc_reader_wait(pr_none):
assert pr_none._proc.poll() is None
pr_none.wait()