aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-06-12 14:52:26 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2018-06-12 14:53:57 +0200
commit5315660baef074d54ae956748203a4ea9c6451b0 (patch)
tree7d018dfe6f1e2b973953faee31513cd2d12709eb /test
parentb22115d9a3b0ab5ce35efbfee95d87cb44b3df54 (diff)
parentfa8071a0985700a4641ce77dac2cb2fa285d3afe (diff)
downloadbitcoin-5315660baef074d54ae956748203a4ea9c6451b0.tar.xz
Merge #13440: qa: Log as utf-8
fa8071a0985700a4641ce77dac2cb2fa285d3afe qa: Log as utf-8 (MarcoFalke) Pull request description: Explicitly read and write the log files with utf-8 as encoding Tree-SHA512: ca28f37f34a09845c736ff6c4c21733c3c39584f52c81e48ff25e5e35979c317d0989862b2b93acc7e359fbcc20b99533365455830b2ddb41eb4d8c17314534e
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/combine_logs.py2
-rwxr-xr-xtest/functional/test_framework/test_framework.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/combine_logs.py b/test/functional/combine_logs.py
index d1bf9206b2..91b6415a7c 100755
--- a/test/functional/combine_logs.py
+++ b/test/functional/combine_logs.py
@@ -63,7 +63,7 @@ def get_log_events(source, logfile):
Log events may be split over multiple lines. We use the timestamp
regex match as the marker for a new log event."""
try:
- with open(logfile, 'r') as infile:
+ with open(logfile, 'r', encoding='utf-8') as infile:
event = ''
timestamp = ''
for line in infile:
diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py
index 75a8986793..5c2555c1ff 100755
--- a/test/functional/test_framework/test_framework.py
+++ b/test/functional/test_framework/test_framework.py
@@ -359,7 +359,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
self.log = logging.getLogger('TestFramework')
self.log.setLevel(logging.DEBUG)
# Create file handler to log all messages
- fh = logging.FileHandler(self.options.tmpdir + '/test_framework.log')
+ fh = logging.FileHandler(self.options.tmpdir + '/test_framework.log', encoding='utf-8')
fh.setLevel(logging.DEBUG)
# Create console handler to log messages to stderr. By default this logs only error messages, but can be configured with --loglevel.
ch = logging.StreamHandler(sys.stdout)