Skip to content

Commit

Permalink
Restyled by autopep8
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and j-ororke committed Dec 19, 2024
1 parent 0c17f4a commit 5350f85
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions src/python_testing/TC_TSTAT_4_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def steps_TC_TSTAT_4_2(self) -> list[TestStep]:

@ async_test_body
async def test_TC_TSTAT_4_2(self):
#super().setup_class()
# super().setup_class()

endpoint = self.get_endpoint()

Expand All @@ -266,7 +266,6 @@ async def test_TC_TSTAT_4_2(self):
params = await self.default_controller.OpenCommissioningWindow(
nodeid=self.dut_node_id, timeout=600, iteration=10000, discriminator=1234, option=1)


secondary_authority = self.certificate_authority_manager.NewCertificateAuthority()
secondary_fabric_admin = secondary_authority.NewFabricAdmin(vendorId=0xFFF1, fabricId=2)
secondary_controller = secondary_fabric_admin.NewController(nodeId=112233)
Expand Down Expand Up @@ -371,7 +370,8 @@ async def test_TC_TSTAT_4_2(self):
for preset in test_presets:
preset.builtIn = NullValue

test_presets.append(self.make_preset(availableScenario, coolSetpoint, heatSetpoint, supportsCool=supportsCool, supportsHeat=supportsHeat))
test_presets.append(self.make_preset(availableScenario, coolSetpoint, heatSetpoint,
supportsCool=supportsCool, supportsHeat=supportsHeat))

await self.send_atomic_request_begin_command()

Expand Down Expand Up @@ -408,7 +408,8 @@ async def test_TC_TSTAT_4_2(self):
if len(builtInPresets) > 0:
builtInPresets[0].builtIn = NullValue

test_presets.append(self.make_preset(availableScenario, coolSetpoint, heatSetpoint, supportsCool=supportsCool, supportsHeat=supportsHeat))
test_presets.append(self.make_preset(availableScenario, coolSetpoint, heatSetpoint,
supportsCool=supportsCool, supportsHeat=supportsHeat))

# Send the AtomicRequest begin command
await self.send_atomic_request_begin_command()
Expand Down Expand Up @@ -533,7 +534,8 @@ async def test_TC_TSTAT_4_2(self):
await self.send_atomic_request_begin_command()

# Write to the presets attribute after adding a preset with builtIn set to True
test_presets.append(self.make_preset(availableScenario, coolSetpoint, heatSetpoint, builtIn=True, supportsCool=supportsCool, supportsHeat=supportsHeat))
test_presets.append(self.make_preset(availableScenario, coolSetpoint, heatSetpoint,
builtIn=True, supportsCool=supportsCool, supportsHeat=supportsHeat))

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

Expand Down Expand Up @@ -616,7 +618,8 @@ async def test_TC_TSTAT_4_2(self):
presets_without_name_support = list(preset for preset in test_presets if preset.presetScenario in availableScenarios)

if len(presets_without_name_support) == 0 and len(availableScenarios) > 0:
new_preset = self.make_preset(availableScenarios[0], coolSetpoint, heatSetpoint, builtIn=True, supportsCool=supportsCool, supportsHeat=supportsHeat)
new_preset = self.make_preset(availableScenarios[0], coolSetpoint, heatSetpoint,
builtIn=True, supportsCool=supportsCool, supportsHeat=supportsHeat)
test_presets.append(new_preset)
presets_without_name_support = [new_preset]

Expand Down Expand Up @@ -645,7 +648,8 @@ async def test_TC_TSTAT_4_2(self):

# Write to the presets attribute with a new valid preset added
test_presets = copy.deepcopy(current_presets)
test_presets.append(self.make_preset(availableScenario, coolSetpoint, heatSetpoint, supportsCool=supportsCool, supportsHeat=supportsHeat))
test_presets.append(self.make_preset(availableScenario, coolSetpoint, heatSetpoint,
supportsCool=supportsCool, supportsHeat=supportsHeat))

# Send the AtomicRequest begin command
await self.send_atomic_request_begin_command()
Expand Down Expand Up @@ -706,7 +710,8 @@ async def test_TC_TSTAT_4_2(self):
presetScenario for presetScenario in cluster.Enums.PresetScenarioEnum if presetScenario not in supportedScenarios)
if len(unavailableScenarios) > 0:
test_presets = current_presets.copy()
test_presets.append(self.make_preset(unavailableScenarios[0], coolSetpoint, heatSetpoint, name="Preset", supportsCool=supportsCool, supportsHeat=supportsHeat))
test_presets.append(self.make_preset(
unavailableScenarios[0], coolSetpoint, heatSetpoint, name="Preset", supportsCool=supportsCool, supportsHeat=supportsHeat))

# Send the AtomicRequest begin command
await self.send_atomic_request_begin_command()
Expand Down Expand Up @@ -761,7 +766,8 @@ async def test_TC_TSTAT_4_2(self):
presetsAddedForScenario = presetsAddedForScenario + 1

while presetsAddedForScenario < presetType.numberOfPresets:
testPresets.append(self.make_preset(scenario, coolSetpoint, heatSetpoint, supportsCool=supportsCool, supportsHeat=supportsHeat))
testPresets.append(self.make_preset(scenario, coolSetpoint, heatSetpoint,
supportsCool=supportsCool, supportsHeat=supportsHeat))
presetsAddedForScenario = presetsAddedForScenario + 1

# Send the AtomicRequest begin command
Expand Down

0 comments on commit 5350f85

Please sign in to comment.