diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/test_framework/test_node.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py index 56087013fb..f2ef17ccb7 100755 --- a/test/functional/test_framework/test_node.py +++ b/test/functional/test_framework/test_node.py @@ -424,8 +424,8 @@ class TestNode(): def wallets_path(self) -> Path: return self.chain_path / "wallets" - def debug_log_bytes(self) -> int: - with open(self.debug_log_path, encoding='utf-8') as dl: + def debug_log_size(self, **kwargs) -> int: + with open(self.debug_log_path, **kwargs) as dl: dl.seek(0, 2) return dl.tell() @@ -434,7 +434,7 @@ class TestNode(): if unexpected_msgs is None: unexpected_msgs = [] time_end = time.time() + timeout * self.timeout_factor - prev_size = self.debug_log_bytes() + prev_size = self.debug_log_size(encoding="utf-8") # Must use same encoding that is used to read() below yield @@ -465,7 +465,7 @@ class TestNode(): the number of log lines we encountered when matching """ time_end = time.time() + timeout * self.timeout_factor - prev_size = self.debug_log_bytes() + prev_size = self.debug_log_size(mode="rb") # Must use same mode that is used to read() below yield |