Skip to content

Commit 49882eb

Browse files
committed
Updated TC_PWRTL_2_1.py:
- Added else condition to return for cases where active or available attribute ID's were not in attibute list on DUT
1 parent 026828d commit 49882eb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/python_testing/TC_PWRTL_2_1.py

+7
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ async def test_TC_PWRTL_2_1(self):
6161
asserts.assert_less_equal(len(available_endpoints), 21,
6262
"AvailableEndpoints length %d must be less than 21!" % len(available_endpoints))
6363

64+
else:
65+
logging.info('Skipping test as available endpoints attribute ID not in attribute list on DUT')
66+
return
67+
6468
self.print_step(3, "Read ActiveEndpoints attribute")
6569
if act_endpoints_attr_id in attribute_list:
6670
active_endpoints = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=Clusters.Objects.PowerTopology, attribute=attributes.ActiveEndpoints)
@@ -70,6 +74,9 @@ async def test_TC_PWRTL_2_1(self):
7074
asserts.assert_true(active_endpoints == NullValue or active_endpoints == [],
7175
"ActiveEndpoints should be null when AvailableEndpoints is null: %s" % active_endpoints)
7276

77+
else:
78+
logging.info('Skipping test as active endpoints attribute ID not in attribute list on DUT')
79+
return
7380

7481
if __name__ == "__main__":
7582
default_matter_test_main()

0 commit comments

Comments
 (0)