mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
[tests] test_runner - check unicode
This commit is contained in:
parent
2584925077
commit
a97ed80f97
@ -27,9 +27,17 @@ import logging
|
||||
|
||||
# Formatting. Default colors to empty strings.
|
||||
BOLD, BLUE, RED, GREY = ("", ""), ("", ""), ("", ""), ("", "")
|
||||
TICK = "✓ "
|
||||
CROSS = "✖ "
|
||||
CIRCLE = "○ "
|
||||
try:
|
||||
# Make sure python thinks it can write unicode to its stdout
|
||||
"\u2713".encode("utf_8").decode(sys.stdout.encoding)
|
||||
TICK = "✓ "
|
||||
CROSS = "✖ "
|
||||
CIRCLE = "○ "
|
||||
except UnicodeDecodeError:
|
||||
TICK = "P "
|
||||
CROSS = "x "
|
||||
CIRCLE = "o "
|
||||
|
||||
if os.name == 'posix':
|
||||
# primitive formatting on supported
|
||||
# terminal via ANSI escape sequences:
|
||||
|
Loading…
Reference in New Issue
Block a user