Skip to content

Commit e244d98

Browse files
restyled-commitsj-ororke
authored andcommitted
Restyled by autopep8
1 parent 4e17514 commit e244d98

File tree

2 files changed

+22
-19
lines changed

2 files changed

+22
-19
lines changed

src/python_testing/TC_CADMIN_1_22.py

+11-9
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,15 @@ async def get_window_status(self) -> int:
8484
def steps_TC_CADMIN_1_22(self) -> list[TestStep]:
8585
return [
8686
TestStep(1, "Commissioning, already done", is_commissioning=True),
87-
TestStep(2, "TH_CR1 opens a commissioning window on DUT_CE using ECM with a value of 900 seconds",
88-
"DUT_CE opens its Commissioning window to allow a second commissioning"),
87+
TestStep(2, "TH_CR1 opens a commissioning window on DUT_CE using ECM with a value of 900 seconds",
88+
"DUT_CE opens its Commissioning window to allow a second commissioning"),
8989
TestStep(3, "TH_CR1 sends an RevokeCommissioning command to the DUT"),
90-
TestStep(4, "TH_CR1 reads the window status to verify the DUT_CE window is closed", "DUT_CE windows status shows the window is closed"),
91-
TestStep(5, "TH_CR1 opens a commissioning window on DUT_CE using ECM with a value of 901 seconds",
92-
"DUT_CE does not open its Commissioning window to allow a second commissioning. DUT_CE shows 'Failed to open commissioning window. Global status 0x85'"),
93-
TestStep(6, "TH_CR1 reads the window status to verify the DUT_CE window is closed", "DUT_CE windows status shows the window is closed"),
90+
TestStep(4, "TH_CR1 reads the window status to verify the DUT_CE window is closed",
91+
"DUT_CE windows status shows the window is closed"),
92+
TestStep(5, "TH_CR1 opens a commissioning window on DUT_CE using ECM with a value of 901 seconds",
93+
"DUT_CE does not open its Commissioning window to allow a second commissioning. DUT_CE shows 'Failed to open commissioning window. Global status 0x85'"),
94+
TestStep(6, "TH_CR1 reads the window status to verify the DUT_CE window is closed",
95+
"DUT_CE windows status shows the window is closed"),
9496
]
9597

9698
def pics_TC_CADMIN_1_22(self) -> list[str]:
@@ -118,15 +120,15 @@ async def test_TC_CADMIN_1_22(self):
118120
asserts.fail(f"Commissioning window is expected to be closed, but was found to be open")
119121

120122
self.step(5)
121-
try:
123+
try:
122124
params = await self.th1.OpenCommissioningWindow(
123125
nodeid=self.dut_node_id, timeout=901, iteration=10000, discriminator=self.discriminator, option=1)
124126

125127
except ChipStackError as e:
126-
# Since we provided 901 seconds as the timeout duration,
128+
# Since we provided 901 seconds as the timeout duration,
127129
# we should not be able to open comm window as duration is too long.
128130
asserts.assert_equal(e.err, 0x00000585,
129-
"Expected to error as we provided failure value for opening commissioning window")
131+
"Expected to error as we provided failure value for opening commissioning window")
130132

131133
self.step(6)
132134
window_status2 = await self.get_window_status()

src/python_testing/TC_CADMIN_1_24.py

+11-10
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,15 @@ async def get_window_status(self) -> int:
8484
def steps_TC_CADMIN_1_24(self) -> list[TestStep]:
8585
return [
8686
TestStep(1, "Commissioning, already done", is_commissioning=True),
87-
TestStep(2, "TH_CR1 opens a commissioning window on DUT_CE using ECM with a value of 180 seconds",
88-
"DUT_CE opens its Commissioning window to allow a second commissioning"),
87+
TestStep(2, "TH_CR1 opens a commissioning window on DUT_CE using ECM with a value of 180 seconds",
88+
"DUT_CE opens its Commissioning window to allow a second commissioning"),
8989
TestStep(3, "TH_CR1 sends an RevokeCommissioning command to the DUT"),
90-
TestStep(4, "TH_CR1 reads the window status to verify the DUT_CE window is closed",
91-
"DUT_CE windows status shows the window is closed"),
92-
TestStep(5, "TH_CR1 opens a commissioning window on DUT_CE using ECM with a value of 179 seconds",
93-
"DUT_CE does not open its Commissioning window to allow a second commissioning. DUT_CE shows 'Failed to open commissioning window. Global status 0x85'"),
94-
TestStep(6, "TH_CR1 reads the window status to verify the DUT_CE window is closed", "DUT_CE windows status shows the window is closed"),
90+
TestStep(4, "TH_CR1 reads the window status to verify the DUT_CE window is closed",
91+
"DUT_CE windows status shows the window is closed"),
92+
TestStep(5, "TH_CR1 opens a commissioning window on DUT_CE using ECM with a value of 179 seconds",
93+
"DUT_CE does not open its Commissioning window to allow a second commissioning. DUT_CE shows 'Failed to open commissioning window. Global status 0x85'"),
94+
TestStep(6, "TH_CR1 reads the window status to verify the DUT_CE window is closed",
95+
"DUT_CE windows status shows the window is closed"),
9596
]
9697

9798
def pics_TC_CADMIN_1_24(self) -> list[str]:
@@ -119,15 +120,15 @@ async def test_TC_CADMIN_1_24(self):
119120
asserts.fail(f"Commissioning window is expected to be closed, but was found to be open")
120121

121122
self.step(5)
122-
try:
123+
try:
123124
params = await self.th1.OpenCommissioningWindow(
124125
nodeid=self.dut_node_id, timeout=179, iteration=10000, discriminator=self.discriminator, option=1)
125126

126127
except ChipStackError as e:
127-
# Since we provided 901 seconds as the timeout duration,
128+
# Since we provided 901 seconds as the timeout duration,
128129
# we should not be able to open comm window as duration is too long.
129130
asserts.assert_equal(e.err, 0x00000585,
130-
"Expected to error as we provided failure value for opening commissioning window")
131+
"Expected to error as we provided failure value for opening commissioning window")
131132

132133
self.step(6)
133134
window_status2 = await self.get_window_status()

0 commit comments

Comments
 (0)