diff options
| author | MarcoFalke <[email protected]> | 2017-04-17 21:54:27 +0200 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2017-04-17 21:54:44 +0200 |
| commit | 6ce733747e160ca699711f2c47e686284ca9aa07 (patch) | |
| tree | abefaaa4aa2dd20c2f62bd7befdd889406aeb959 | |
| parent | Merge #10178: Remove CValidationInterface::UpdatedTransaction (diff) | |
| parent | [tests] test_runner - check unicode (diff) | |
| download | discoin-6ce733747e160ca699711f2c47e686284ca9aa07.tar.xz discoin-6ce733747e160ca699711f2c47e686284ca9aa07.zip | |
Merge #10222: [tests] test_runner - check unicode
a97ed80 [tests] test_runner - check unicode (John Newbery)
Tree-SHA512: f395297b854a967ad81eed9b822a8f33660fa2ffb9b3bd8fb3b287c32caf5792bd53faad836602f45a5e302800e04d2723d5107531f3643fbf1895e35f98d2ba
| -rwxr-xr-x | test/functional/test_runner.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py index bb12328ec..a5a44ea77 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -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: |