diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2020-04-03 19:53:54 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2020-04-03 19:53:54 +0200 |
commit | a0cfcd141972092de53e96db88c947b8c52feb37 (patch) | |
tree | 463c2f0dd61153d6860466ef92acf9e6a9b9fb96 | |
parent | 555cbdeac72aaa57c0d684d648bfa4b436b9a323 (diff) | |
download | cython-a0cfcd141972092de53e96db88c947b8c52feb37.tar.gz |
Enable unicode console output in the test runner on Windows.
-rw-r--r-- | appveyor.yml | 1 | ||||
-rwxr-xr-x | runtests.py | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/appveyor.yml b/appveyor.yml index 25696c7b9..bd9a67bb8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -92,6 +92,7 @@ build_script: test: off test_script: - "%PYTHON%\\Scripts\\pip.exe install -r test-requirements.txt" + - "%PYTHON%\\Scripts\\pip.exe install win_unicode_console" - "set CFLAGS=/Od /W3" - "%WITH_ENV% %PYTHON%\\python.exe runtests.py -vv --backend=%BACKEND% --no-code-style -j5" diff --git a/runtests.py b/runtests.py index 4884d1511..940ac9827 100755 --- a/runtests.py +++ b/runtests.py @@ -2328,6 +2328,14 @@ def runtests(options, cmd_args, coverage=None): else: faulthandler.enable() + if sys.platform == "win32" and sys.version_info < (3, 6): + # enable Unicode console output, if possible + try: + import win_unicode_console + except ImportError: + pass + else: + win_unicode_console.enable() WITH_CYTHON = options.with_cython ROOTDIR = os.path.abspath(options.root_dir) |