mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
Merge #10222: [tests] test_runner - check unicode
a97ed80
[tests] test_runner - check unicode (John Newbery)
Tree-SHA512: f395297b854a967ad81eed9b822a8f33660fa2ffb9b3bd8fb3b287c32caf5792bd53faad836602f45a5e302800e04d2723d5107531f3643fbf1895e35f98d2ba
This commit is contained in:
parent
73a5d9bfdd
commit
fc5e461eeb
@ -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