From 917bc82a6d83c44719854742c8040257d90a5dc5 Mon Sep 17 00:00:00 2001 From: Martin Matusiak Date: Wed, 5 May 2021 18:08:36 +1000 Subject: try removing disabled tests --- tests/test_colors.py | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'tests') diff --git a/tests/test_colors.py b/tests/test_colors.py index 37c53e3..43ae309 100644 --- a/tests/test_colors.py +++ b/tests/test_colors.py @@ -19,16 +19,6 @@ from ansicolor import write_out import ansicolor -@contextlib.contextmanager -def disabled_state(): - ansicolor.ansicolor._disabled = True - - try: - # run the test with colors disabled - yield - - finally: - ansicolor.ansicolor._disabled = False def test_codes(): @@ -55,9 +45,6 @@ def test_codes(): assert "\033[1;7;31m" == get_code(Colors.Red, bold=True, reverse=True) -def test_codes_disabled(): - with disabled_state(): - assert "" == get_code(Colors.Black) def test_codes_v2(): @@ -104,9 +91,6 @@ def test_codes_v2(): ) -def test_codes_v2_disabled(): - with disabled_state(): - assert "" == get_code_v2(Colors.Black) def test_coloring(): @@ -247,10 +231,6 @@ def test_wrap_string(): ) -def test_wrap_string_disabled(): - with disabled_state(): - assert "Hi|there" == wrap_string("Hi there", 3, Colors.Red) - assert "|i there" == wrap_string("Hi there", 0, Colors.Red) def test_strip_escapes(): -- cgit v1.2.1