summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-10-14 09:22:00 +0200
committerGeorg Brandl <georg@python.org>2014-10-14 09:22:00 +0200
commitcfc2da495af0673d4a263235740c87ec0570b48f (patch)
tree1e2b3be7edcd67afde7f2c81a282291d58ec695b
parent0f46321f9c947f8a016da8ab111d44119bf52708 (diff)
downloadpygments-cfc2da495af0673d4a263235740c87ec0570b48f.tar.gz
Fix encoding of the test streams.
-rw-r--r--tests/test_cmdline.py4
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()