Skip to content

Commit 2ff04f7

Browse files
committed
[Python] Remove unexpected exception in TC_CGEN_2_4.py
With the test commissioner properly resetting the error code the spurious exception is no longer thrown. Remove the exception handling from the test.
1 parent 9c44d1c commit 2ff04f7

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/python_testing/TC_CGEN_2_4.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,9 @@ async def test_TC_CGEN_2_4(self):
104104
logging.info('Step 16 - TH2 fully commissions the DUT')
105105
self.th2.ResetTestCommissioner()
106106

107-
ctx = asserts.assert_raises(ChipStackError)
108-
with ctx:
109-
self.th2.CommissionOnNetwork(
110-
nodeId=self.dut_node_id, setupPinCode=params.setupPinCode,
111-
filterType=ChipDeviceCtrl.DiscoveryFilterType.LONG_DISCRIMINATOR, filter=self.discriminator)
112-
asserts.assert_true(ctx.exception.chip_error.sdk_code == 0x02, 'Unexpected error code returned from CommissioningComplete')
107+
self.th2.CommissionOnNetwork(
108+
nodeId=self.dut_node_id, setupPinCode=params.setupPinCode,
109+
filterType=ChipDeviceCtrl.DiscoveryFilterType.LONG_DISCRIMINATOR, filter=self.discriminator)
113110
logging.info('Commissioning complete done.')
114111

115112
logging.info('Step 17 - TH1 sends an arm failsafe')

0 commit comments

Comments
 (0)