Initial test refactoring
This commit is contained in:
17
tests/utils/colors.py
Normal file
17
tests/utils/colors.py
Normal file
@@ -0,0 +1,17 @@
|
||||
pref = "\033["
|
||||
reset = f"{pref}0m"
|
||||
|
||||
class colors:
|
||||
black = "30m"
|
||||
red = "31m"
|
||||
green = "32m"
|
||||
yellow = "33m"
|
||||
blue = "34m"
|
||||
magenta = "35m"
|
||||
cyan = "36m"
|
||||
white = "37m"
|
||||
|
||||
def puts(text, *args, color=colors.white, is_bold=False, **kwargs):
|
||||
print(f'{pref}{1 if is_bold else 0};{color}' + text + reset, *args, **kwargs)
|
||||
|
||||
def sep(): puts("-----------------------------------", is_bold=True)
|
||||
Reference in New Issue
Block a user