Skip to content

Commit f7f8947

Browse files
committed
Python formatting for restyled
1 parent a5f08fb commit f7f8947

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

src/python_testing/TC_TSTAT_4_2.py

+12-11
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@ def get_available_scenario(self, presetTypes: list, presetScenarioCounts: map):
100100
if len(availableScenarios) > 0:
101101
return availableScenarios[0]
102102
return None
103-
104-
def make_preset(self, presetScenario, coolSetpoint, heatSetpoint, presetHandle = NullValue, name=None,builtIn=False):
103+
104+
def make_preset(self, presetScenario, coolSetpoint, heatSetpoint, presetHandle=NullValue, name=None, builtIn=False):
105105
preset = cluster.Structs.PresetStruct(presetHandle=presetHandle, presetScenario=presetScenario, builtIn=builtIn)
106106
if self.check_pics("TSTAT.S.F00"):
107-
preset.heatingSetpoint=heatSetpoint
107+
preset.heatingSetpoint = heatSetpoint
108108
if self.check_pics("TSTAT.S.F01"):
109-
preset.coolingSetpoint=coolSetpoint
109+
preset.coolingSetpoint = coolSetpoint
110110
if name is not None:
111111
preset.name = name
112112
return preset
@@ -359,7 +359,7 @@ async def test_TC_TSTAT_4_2(self):
359359
if len(builtInPresets) > 0:
360360
builtInPresets[0].builtIn = NullValue
361361

362-
test_presets.append(self.make_preset( availableScenario, coolSetpoint,heatSetpoint))
362+
test_presets.append(self.make_preset(availableScenario, coolSetpoint, heatSetpoint))
363363

364364
# Send the AtomicRequest begin command
365365
await self.send_atomic_request_begin_command()
@@ -449,7 +449,6 @@ async def test_TC_TSTAT_4_2(self):
449449
await self.write_single_attribute(attribute_value=cluster.Attributes.UnoccupiedHeatingSetpoint(heatSetpoint+1), endpoint_id=endpoint)
450450
elif supportsCool:
451451
await self.write_single_attribute(attribute_value=cluster.Attributes.UnoccupiedCoolingSetpoint(coolSetpoint+1), endpoint_id=endpoint)
452-
453452

454453
activePresetHandle = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.ActivePresetHandle)
455454
logger.info(f"Rx'd ActivePresetHandle: {activePresetHandle}")
@@ -508,7 +507,8 @@ async def test_TC_TSTAT_4_2(self):
508507

509508
# Write to the presets attribute after adding a preset with a preset handle that doesn't exist in Presets attribute
510509
test_presets = copy.deepcopy(current_presets)
511-
test_presets.append(self.make_preset(cluster.Enums.PresetScenarioEnum.kWake, coolSetpoint, heatSetpoint, presetHandle=random.randbytes(16),name="Wake", builtIn=True))
510+
test_presets.append(self.make_preset(cluster.Enums.PresetScenarioEnum.kWake, coolSetpoint,
511+
heatSetpoint, presetHandle=random.randbytes(16), name="Wake", builtIn=True))
512512

513513
status = await self.write_presets(endpoint=endpoint, presets=test_presets, expected_status=Status.NotFound)
514514

@@ -529,7 +529,8 @@ async def test_TC_TSTAT_4_2(self):
529529
await self.send_atomic_request_begin_command()
530530

531531
# Write to the presets attribute after adding a duplicate preset
532-
test_presets.append(self.make_preset(availableScenario, coolSetpoint, heatSetpoint, presetHandle=duplicatePreset.presetHandle))
532+
test_presets.append(self.make_preset(availableScenario, coolSetpoint,
533+
heatSetpoint, presetHandle=duplicatePreset.presetHandle))
533534

534535
await self.write_presets(endpoint=endpoint, presets=test_presets, expected_status=Status.ConstraintError)
535536

@@ -571,7 +572,7 @@ async def test_TC_TSTAT_4_2(self):
571572
presets_without_name_support = list(preset for preset in test_presets if preset.presetScenario in availableScenarios)
572573

573574
if len(presets_without_name_support) == 0 and len(availableScenarios) > 0:
574-
new_preset = self.make_preset( availableScenarios[0], coolSetpoint, heatSetpoint, builtIn=True)
575+
new_preset = self.make_preset(availableScenarios[0], coolSetpoint, heatSetpoint, builtIn=True)
575576
test_presets.append(new_preset)
576577
presets_without_name_support = [new_preset]
577578

@@ -659,7 +660,7 @@ async def test_TC_TSTAT_4_2(self):
659660
presetScenario for presetScenario in cluster.Enums.PresetScenarioEnum if presetScenario not in supportedScenarios)
660661
if len(unavailableScenarios) > 0:
661662
test_presets = current_presets.copy()
662-
test_presets.append(self.make_preset(unavailableScenarios[0],coolSetpoint, heatSetpoint,name="Preset"))
663+
test_presets.append(self.make_preset(unavailableScenarios[0], coolSetpoint, heatSetpoint, name="Preset"))
663664

664665
# Send the AtomicRequest begin command
665666
await self.send_atomic_request_begin_command()
@@ -692,7 +693,7 @@ async def test_TC_TSTAT_4_2(self):
692693
presetsAddedForScenario = presetsAddedForScenario + 1
693694

694695
while presetsAddedForScenario < presetType.numberOfPresets:
695-
testPresets.append(self.make_preset(scenario,coolSetpoint, heatSetpoint))
696+
testPresets.append(self.make_preset(scenario, coolSetpoint, heatSetpoint))
696697
presetsAddedForScenario = presetsAddedForScenario + 1
697698

698699
# Send the AtomicRequest begin command

0 commit comments

Comments
 (0)