From fa2163159511a099ecffde2bfddf9cfe33eb9c76 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Thu, 19 Jun 2025 09:02:31 +0200 Subject: [PATCH] test: Use self.log This is in line with all other functional tests. --- test/functional/tool_utils.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/functional/tool_utils.py b/test/functional/tool_utils.py index 686b7e42a98..6dfe27c3466 100755 --- a/test/functional/tool_utils.py +++ b/test/functional/tool_utils.py @@ -9,7 +9,6 @@ from test_framework.test_framework import BitcoinTestFramework import difflib import json -import logging import os import subprocess from pathlib import Path @@ -77,16 +76,16 @@ class ToolUtils(BitcoinTestFramework): try: a_parsed = parse_output(res.stdout, outputType) except Exception as e: - logging.error(f"Error parsing command output as {outputType}: '{str(e)}'; res: {str(res)}") + self.log.error(f"Error parsing command output as {outputType}: '{str(e)}'; res: {str(res)}") raise try: b_parsed = parse_output(outputData, outputType) except Exception as e: - logging.error('Error parsing expected output %s as %s: %s' % (outputFn, outputType, e)) + self.log.error('Error parsing expected output %s as %s: %s' % (outputFn, outputType, e)) raise # Compare data if a_parsed != b_parsed: - logging.error(f"Output data mismatch for {outputFn} (format {outputType}); res: {str(res)}") + self.log.error(f"Output data mismatch for {outputFn} (format {outputType}); res: {str(res)}") data_mismatch = True # Compare formatting if res.stdout != outputData: @@ -95,7 +94,7 @@ class ToolUtils(BitcoinTestFramework): res.stdout.splitlines(True), fromfile=outputFn, tofile="returned")) - logging.error(error_message) + self.log.error(error_message) formatting_mismatch = True assert not data_mismatch and not formatting_mismatch