Skip to content

Commit 7c93c8c

Browse files
committed
removed duplicate log_structured_data function from basic_composition module, now inheriting it directly from matter_testing in test_TC_IDM_12_1 test in TC_DeviceBasicCompositon test module
1 parent f2fc773 commit 7c93c8c

File tree

2 files changed

+2
-20
lines changed

2 files changed

+2
-20
lines changed

src/python_testing/matter_testing_infrastructure/matter/testing/basic_composition.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -40,24 +40,6 @@
4040

4141
LOGGER = logging.getLogger(__name__)
4242

43-
44-
def log_structured_data(start_tag: str, dump_string: str):
45-
"""Log structured data with a clear start and end marker.
46-
47-
This function is used to output device attribute dumps and other structured
48-
data to logs in a format that can be easily extracted for debugging.
49-
50-
Args:
51-
start_tag: A prefix tag to identify the type of data being logged
52-
dump_string: The data to be logged
53-
"""
54-
lines = dump_string.splitlines()
55-
LOGGER.info(f'{start_tag}BEGIN ({len(lines)} lines)====')
56-
for line in lines:
57-
LOGGER.info(f'{start_tag}{line}')
58-
LOGGER.info(f'{start_tag}END ====')
59-
60-
6143
@dataclass
6244
class ArlData:
6345
have_arl: bool

src/python_testing/matter_testing_infrastructure/matter/testing/matter_testing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,12 +242,12 @@ def _dump_device_attributes_on_failure(self):
242242
if hasattr(self, 'dump_wildcard'):
243243
_, txt_str = self.dump_wildcard(None)
244244
# Only dump the text format - it's more readable for debugging
245-
self._log_structured_data('==== FAILURE_DUMP_txt: ', txt_str)
245+
self.log_structured_data('==== FAILURE_DUMP_txt: ', txt_str)
246246
except (AttributeError, KeyError, ValueError, TypeError):
247247
# Don't let data access or serialization errors interfere with the original test failure
248248
pass
249249

250-
def _log_structured_data(self, start_tag: str, dump_string: str):
250+
def log_structured_data(self, start_tag: str, dump_string: str):
251251
"""Log structured data with a clear start and end marker.
252252
253253
This function is used to output device attribute dumps and other structured

0 commit comments

Comments
 (0)