You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reading all clusters from all endpoints, when there is a write-only attribute on the device, there is a discrepancy between what is read and what shows up on AttributeList. Specifically, Clusters.UnitTesting.Attributes.WriteOnlyInt8u shows up on the former list but not the latter list.
How do I address this when testing? Ignore all write-only attributes when doing a comparison?
Steps to reproduce the behavior
Use code that looks similar to this to reproduce the issue:
The following code returns all clusters on all endpoints:
When looping through the returned list of attributes like this, the first list contains Clusters.UnitTesting.Attributes.WriteOnlyInt8u, but the second list doesn't:
for endpoint in read_request:
for cluster in read_request[endpoint]:
returned_attrs = sorted([x.attribute_id for x in read_request[endpoint][cluster].keys() if x != Clusters.Attribute.DataVersion])
attr_list = sorted(read_request[endpoint][cluster][cluster.Attributes.AttributeList])
asserts.assert_equal(returned_attrs, attr_list, f"Mismatch for {cluster} at endpoint {endpoint}")
(The sorted function is there to make it easier to perform an assert statement later, to ensure that the lists try to match.)
Expected behavior
The expected behavior is there is a parity between both lists; i.e. either write-only attributes are present in the returned list and AttributeList, or neither of them are.
Describe the bug
When reading all clusters from all endpoints, when there is a write-only attribute on the device, there is a discrepancy between what is read and what shows up on AttributeList. Specifically,
Clusters.UnitTesting.Attributes.WriteOnlyInt8u
shows up on the former list but not the latter list.How do I address this when testing? Ignore all write-only attributes when doing a comparison?
Steps to reproduce the behavior
Use code that looks similar to this to reproduce the issue:
The following code returns all clusters on all endpoints:
read_request = await self.default_controller.ReadAttribute(self.dut_node_id, [()])
When looping through the returned list of attributes like this, the first list contains
Clusters.UnitTesting.Attributes.WriteOnlyInt8u
, but the second list doesn't:(The sorted function is there to make it easier to perform an assert statement later, to ensure that the lists try to match.)
Expected behavior
The expected behavior is there is a parity between both lists; i.e. either write-only attributes are present in the returned list and AttributeList, or neither of them are.
Log files
Write_only_log.txt
PICS file
No response
Screenshots
No response
Environment
Used:
Other test apps are untested.
Additional Information
No response
The text was updated successfully, but these errors were encountered: