summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Matusiak <numerodix@gmail.com>2021-05-05 10:14:19 +1000
committerMartin Matusiak <numerodix@gmail.com>2021-05-05 10:14:19 +1000
commit6a0feef19d25fb88608a4f682bb366fe7bf8c6aa (patch)
treea9932876d844595eadf8909d1f76eca6192ea20d /tests
parent3b6effb0a60743c639e51fab63ae866f5cc762c0 (diff)
downloadansicolor-6a0feef19d25fb88608a4f682bb366fe7bf8c6aa.tar.gz
fix test to call colorize_v2 instead
Diffstat (limited to 'tests')
-rw-r--r--tests/test_colors.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/test_colors.py b/tests/test_colors.py
index ea1fb38..5bfc523 100644
--- a/tests/test_colors.py
+++ b/tests/test_colors.py
@@ -80,14 +80,14 @@ def test_highlights():
assert Colors.Yellow == get_highlighter(1)
-def test_colorize1():
+def test_colorize():
assert (
get_code(Colors.Red)
+ "Hi there"
+ get_code(None)
) == colorize("Hi there", Colors.Red)
-def test_colorize2():
+def test_colorize_with_start_end():
assert (
"H"
+ get_code(Colors.Red)
@@ -98,18 +98,18 @@ def test_colorize2():
def test_colorize_v2():
assert (
- get_code(Colors.Red)
+ get_code_v2(Colors.Red)
+ "Hi there"
- + get_code(None)
- ) == colorize("Hi there", Colors.Red)
+ + get_code_v2(None)
+ ) == colorize_v2("Hi there", Colors.Red)
assert (
"H"
- + get_code(Colors.Red)
+ + get_code_v2(Colors.Red)
+ "i ther"
- + get_code(None)
+ + get_code_v2(None)
+ "e"
- ) == colorize("Hi there", Colors.Red, start=1, end=7)
+ ) == colorize_v2("Hi there", Colors.Red, start=1, end=7)
def test_wrap_string():