Skip to content

Commit

Permalink
Update text
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 committed Sep 4, 2024
1 parent 4dfd581 commit 8eb3645
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/python_testing/TestUnitTestingErrorPath.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ async def test_unit_test_error_read(self):

self.print_step(0, "Commissioning - already done")

self.print_step(1, "Set error to failure.")
self.print_step(1, "Set error to 'Failure' for all subsequent reads of FailureInt32U.")
await self.default_controller.WriteAttribute(
nodeid=self.dut_node_id,
attributes=[(endpoint_id, attributes.ReadFailureCode(int(Status.Failure)))],
)

self.print_step(2, "Expect failure on reading")
self.print_step(2, "Expect that reading FailureInt32U returns the previously set 'Failure' code.")
try:
data = await self.default_controller.ReadAttribute(
self.dut_node_id, [(endpoint_id, attributes.FailureInt32U)]
Expand All @@ -68,13 +68,13 @@ async def test_unit_test_error_read(self):
except InteractionModelError:
asserts.fail("Failure reading")

self.print_step(3, "Set a different error")
self.print_step(3, "Set error to 'ResourceExhausted' for all subsequent reads of FailureInt32U.")
await self.default_controller.WriteAttribute(
nodeid=self.dut_node_id,
attributes=[(endpoint_id, attributes.ReadFailureCode(int(Status.ResourceExhausted)))],
)

self.print_step(4, "Expect Updated failure reading")
self.print_step(4, "Expect that reading FailureInt32U returns the previously set 'ResourceExhausted' code.")
try:
data = await self.default_controller.ReadAttribute(
self.dut_node_id, [(endpoint_id, attributes.FailureInt32U)]
Expand All @@ -89,7 +89,7 @@ async def test_unit_test_error_read(self):
except InteractionModelError:
asserts.fail("Failure reading")

self.print_step(5, "Reset error to default")
self.print_step(5, "Reset ReadFailureCode error to default 'Failure' code.")
await self.default_controller.WriteAttribute(
nodeid=self.dut_node_id,
attributes=[(1, attributes.ReadFailureCode(int(Status.Failure)))],
Expand Down

0 comments on commit 8eb3645

Please sign in to comment.