Skip to content

Commit 9b7eb5e

Browse files
committed
testrunner: Now reads output file using unicode
1 parent f74f3c9 commit 9b7eb5e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

test/testrunner.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import time
99
import multiprocessing # To figure out number of cpus
1010
import junit_xml as jx
11+
import codecs
1112

1213
sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 1) # line buffering
1314
sys.path.insert(0, ".")
@@ -162,10 +163,10 @@ def wait_status(self):
162163
# Start and wait for the process
163164
self.proc_.communicate()
164165

165-
with open('{}/log_stdout.log'.format(self.path_), 'r') as log_stdout:
166+
with codecs.open('{}/log_stdout.log'.format(self.path_), encoding='utf-8') as log_stdout:
166167
self.output_.append(log_stdout.read())
167168

168-
with open('{}/log_stderr.log'.format(self.path_), 'r') as log_stderr:
169+
with codecs.open('{}/log_stderr.log'.format(self.path_), encoding='utf-8') as log_stderr:
169170
self.output_.append(log_stderr.read())
170171

171172

0 commit comments

Comments
 (0)