🎨 fix: color codes in error (#26)

This commit is contained in:
Florian Hönicke
2023-04-20 13:18:47 +02:00
committed by GitHub
parent 78a4580e00
commit 0fb7aafb85
2 changed files with 17 additions and 0 deletions

11
test/test_strings.py Normal file
View File

@@ -0,0 +1,11 @@
from src.apis.jina_cloud import clean_color_codes
def test_clean_color_codes():
color_start = f"\033[{31}m"
reset = "\033[0m"
bold_start = "\033[1m"
color = f"{bold_start}{color_start}test{reset}"
cleaned = clean_color_codes(color)
print('with color codes:', color)
print('without color codes:', cleaned)