File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 9
9
10
10
import difflib
11
11
import json
12
- import logging
13
12
import os
14
13
import subprocess
15
14
from pathlib import Path
@@ -77,16 +76,16 @@ def test_one(self, testObj):
77
76
try :
78
77
a_parsed = parse_output (res .stdout , outputType )
79
78
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 )} " )
81
80
raise
82
81
try :
83
82
b_parsed = parse_output (outputData , outputType )
84
83
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 ))
86
85
raise
87
86
# Compare data
88
87
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 )} " )
90
89
data_mismatch = True
91
90
# Compare formatting
92
91
if res .stdout != outputData :
@@ -95,7 +94,7 @@ def test_one(self, testObj):
95
94
res .stdout .splitlines (True ),
96
95
fromfile = outputFn ,
97
96
tofile = "returned" ))
98
- logging .error (error_message )
97
+ self . log .error (error_message )
99
98
formatting_mismatch = True
100
99
101
100
assert not data_mismatch and not formatting_mismatch
You can’t perform that action at this time.
0 commit comments