Skip to content

Commit b04d1a9

Browse files
Removes duplicate AttributeChangeCallback class
1 parent f68d2e8 commit b04d1a9

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/python_testing/matter_testing_support.py

-17
Original file line numberDiff line numberDiff line change
@@ -391,23 +391,6 @@ def attribute_report_counts(self) -> dict[ClusterObjects.ClusterAttributeDescrip
391391
def attribute_reports(self) -> dict[ClusterObjects.ClusterAttributeDescriptor, AttributeValue]:
392392
return self._attribute_reports
393393

394-
395-
class AttributeChangeCallback:
396-
def __init__(self, expected_attribute: ClusterObjects.ClusterAttributeDescriptor):
397-
self._output = queue.Queue()
398-
self._expected_attribute = expected_attribute
399-
400-
def __call__(self, path: TypedAttributePath, transaction: SubscriptionTransaction):
401-
"""This is the subscription callback when an attribute is updated.
402-
It checks the passed in attribute is the same as the subscribed to attribute and
403-
then posts it into the queue for later processing."""
404-
405-
asserts.assert_equal(path.AttributeType, self._expected_attribute,
406-
f"[AttributeChangeCallback] Attribute mismatch. Expected: {self._expected_attribute}, received: {path.AttributeType}")
407-
logging.info(f"[AttributeChangeCallback] Attribute update callback for {path.AttributeType}")
408-
q = (path, transaction)
409-
self._output.put(q)
410-
411394
def wait_for_report(self):
412395
try:
413396
path, transaction = self._output.get(block=True, timeout=10)

0 commit comments

Comments
 (0)