Skip to content

Commit fa21631

Browse files
author
MarcoFalke
committed
test: Use self.log
This is in line with all other functional tests.
1 parent fa346f7 commit fa21631

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/functional/tool_utils.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010
import difflib
1111
import json
12-
import logging
1312
import os
1413
import subprocess
1514
from pathlib import Path
@@ -77,16 +76,16 @@ def test_one(self, testObj):
7776
try:
7877
a_parsed = parse_output(res.stdout, outputType)
7978
except Exception as e:
80-
logging.error(f"Error parsing command output as {outputType}: '{str(e)}'; res: {str(res)}")
79+
self.log.error(f"Error parsing command output as {outputType}: '{str(e)}'; res: {str(res)}")
8180
raise
8281
try:
8382
b_parsed = parse_output(outputData, outputType)
8483
except Exception as e:
85-
logging.error('Error parsing expected output %s as %s: %s' % (outputFn, outputType, e))
84+
self.log.error('Error parsing expected output %s as %s: %s' % (outputFn, outputType, e))
8685
raise
8786
# Compare data
8887
if a_parsed != b_parsed:
89-
logging.error(f"Output data mismatch for {outputFn} (format {outputType}); res: {str(res)}")
88+
self.log.error(f"Output data mismatch for {outputFn} (format {outputType}); res: {str(res)}")
9089
data_mismatch = True
9190
# Compare formatting
9291
if res.stdout != outputData:
@@ -95,7 +94,7 @@ def test_one(self, testObj):
9594
res.stdout.splitlines(True),
9695
fromfile=outputFn,
9796
tofile="returned"))
98-
logging.error(error_message)
97+
self.log.error(error_message)
9998
formatting_mismatch = True
10099

101100
assert not data_mismatch and not formatting_mismatch

0 commit comments

Comments
 (0)