diff options
author | Georg Brandl <georg@python.org> | 2014-10-14 09:22:00 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-10-14 09:22:00 +0200 |
commit | cfc2da495af0673d4a263235740c87ec0570b48f (patch) | |
tree | 1e2b3be7edcd67afde7f2c81a282291d58ec695b | |
parent | 0f46321f9c947f8a016da8ab111d44119bf52708 (diff) | |
download | pygments-cfc2da495af0673d4a263235740c87ec0570b48f.tar.gz |
Fix encoding of the test streams.
-rw-r--r-- | tests/test_cmdline.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_cmdline.py b/tests/test_cmdline.py index 9e26ce17..2e02ae52 100644 --- a/tests/test_cmdline.py +++ b/tests/test_cmdline.py @@ -28,8 +28,8 @@ def run_cmdline(*args): if sys.version_info > (3,): stdout_buffer = BytesIO() stderr_buffer = BytesIO() - new_stdout = sys.stdout = io.TextIOWrapper(stdout_buffer) - new_stderr = sys.stderr = io.TextIOWrapper(stderr_buffer) + new_stdout = sys.stdout = io.TextIOWrapper(stdout_buffer, 'utf-8') + new_stderr = sys.stderr = io.TextIOWrapper(stderr_buffer, 'utf-8') else: stdout_buffer = new_stdout = sys.stdout = StringIO() stderr_buffer = new_stderr = sys.stderr = StringIO() |