Skip to content

Commit d6922f2

Browse files
restyled
1 parent 4b6f059 commit d6922f2

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/python_testing/TC_FAN_3_2.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,12 @@ async def read_verify_setting(self, attribute, type, range):
109109
# Verify response is valid (value is within expected range)
110110
asserts.assert_in(value, range, f"[FC] {attribute.__name__} result ({value}) is invalid")
111111

112-
return value
112+
return value
113113

114114
async def verify_attribute_invalid_in_state(self, attribute, init_value) -> None:
115115
value_current = await self.read_setting(attribute)
116-
asserts.assert_equal(value_current, init_value, f"[FC] Current {attribute.__name__} value ({value_current}) must be equal to its initial value ({init_value}).")
116+
asserts.assert_equal(value_current, init_value,
117+
f"[FC] Current {attribute.__name__} value ({value_current}) must be equal to its initial value ({init_value}).")
117118

118119
def pics_TC_FAN_3_2(self) -> list[str]:
119120
return ["FAN.S"]
@@ -155,7 +156,8 @@ async def test_TC_FAN_3_2(self):
155156
init_percent_setting = await self.read_verify_setting(attributes.PercentSetting, Uint8Type, range(0, 101))
156157
init_percent_current = await self.read_verify_setting(attributes.PercentCurrent, Uint8Type, range(0, 101))
157158
init_fan_mode = await self.read_verify_setting(attributes.FanMode, fm_enum, [0, 1, 2, 3, 5])
158-
logging.info(f"[FC] Initial state - SpeedSetting: {init_speed_setting}, SpeedCurrent: {init_speed_current}, PercentSetting: {init_percent_setting}, PercentCurrent: {init_percent_current}, FanMode: {init_fan_mode}")
159+
logging.info(
160+
f"[FC] Initial state - SpeedSetting: {init_speed_setting}, SpeedCurrent: {init_speed_current}, PercentSetting: {init_percent_setting}, PercentCurrent: {init_percent_current}, FanMode: {init_fan_mode}")
159161

160162
# *** STEP 4 ***
161163
# TH subscribes to the DUT's FanControl cluster
@@ -190,12 +192,12 @@ async def test_TC_FAN_3_2(self):
190192
AttributeValue(self.endpoint, attributes.PercentSetting, percent_setting_expected),
191193
AttributeValue(self.endpoint, attributes.PercentCurrent, percent_setting_expected),
192194
AttributeValue(self.endpoint, attributes.FanMode, fan_mode_expected)
193-
]
195+
]
194196
self.attribute_subscription.await_all_final_values_reported(
195197
expected_final_values=expected_values, timeout_sec=1)
196198

197199
# If the write operation returned CONSTRAINT_ERROR, verify that the SpeedSetting, SpeedCurrent,
198-
# PercentSetting, PercentCurrent, and FanMode attributes are the same as their initial values
200+
# PercentSetting, PercentCurrent, and FanMode attributes are the same as their initial values
199201
elif write_status == Status.ConstraintError:
200202
await self.verify_attribute_invalid_in_state(attributes.FanMode, init_fan_mode)
201203
await self.verify_attribute_invalid_in_state(attributes.SpeedSetting, init_speed_setting)

0 commit comments

Comments
 (0)