Selaa lähdekoodia

[tests] test_runner - check unicode

tags/v0.15.1
John Newbery 4 vuotta sitten
vanhempi
commit
a97ed80f97
1 muutettua tiedostoa jossa 11 lisäystä ja 3 poistoa
  1. 11
    3
      test/functional/test_runner.py

+ 11
- 3
test/functional/test_runner.py Näytä tiedosto

@@ -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…
Peruuta
Tallenna