Skip to content

Commit 5c5ca26

Browse files
cosmetics
1 parent bcf08d8 commit 5c5ca26

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/python_testing/TC_FAN_3_1.py

+5-9
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ async def verify_fan_control_attribute_values(self, endpoint, attr_to_update, or
266266
speed_setting_current = speed_setting_read
267267
speed_setting_previous = speed_setting_read
268268
for value_to_write in iteration_range:
269-
# Clear the queue before each update to avoid attribute report duplicates
269+
# Clear the attribute report queue before each update to avoid duplicates
270270
self.attribute_subscription.get_last_report()
271271

272272
# Write to attribute
@@ -277,16 +277,14 @@ async def verify_fan_control_attribute_values(self, endpoint, attr_to_update, or
277277
# Verify that the current attribute value is greater than the previous
278278
# one if order was set to Ascending, or less if order was set to Descending
279279
if write_status == Status.Success:
280-
# Get current attribute value
280+
# Get current attribute value and verify progression
281281
queue = self.attribute_subscription.attribute_queue.queue
282282
attr_value_current = await self.get_attribute_value_from_queue(queue, attr_to_verify, timeout_sec)
283-
284-
# Verify attribute value progression
285283
if attr_value_current is not None:
286284
self.verify_attribute_progression(attr_to_verify, attr_value_current, attr_value_previous, order)
287285
attr_value_previous = attr_value_current
288286

289-
# Verify the same for the SpeedSetting attribute value (if supported)
287+
# Get current SpeedSetting attribute value and verify progression (if supported)
290288
if self.supports_speed:
291289
speed_setting_current = await self.get_attribute_value_from_queue(queue, speed_setting_attr, timeout_sec)
292290
if speed_setting_current is not None:
@@ -296,14 +294,12 @@ async def verify_fan_control_attribute_values(self, endpoint, attr_to_update, or
296294
# If the write status is INVALID_IN_STATE, it means no write operation occurred
297295
# Verify that the current attribute value is equal to the previous one
298296
elif write_status == Status.InvalidInState:
299-
# Get current attribute value
297+
# Get current attribute value and verify it's equal to the previous value
300298
attr_value_current = await self.read_setting(endpoint, attr_to_verify)
301-
302-
# Verify attribute value
303299
asserts.assert_equal(attr_value_current, attr_value_previous,
304300
f"[FC] Current {attr_to_verify.__name__} attribute value must be equal to the previous one")
305301

306-
# Verify the same for the SpeedSetting attribute value (if supported)
302+
# Get current SpeedSetting attribute value and verify it's equal to the previous value (if supported)
307303
if self.supports_speed:
308304
speed_setting_current = await self.read_setting(endpoint, speed_setting_attr)
309305
asserts.assert_equal(speed_setting_current, speed_setting_previous,

0 commit comments

Comments
 (0)