Skip to content

Commit

Permalink
Update TC_OCC_3_2.py
Browse files Browse the repository at this point in the history
restyled
  • Loading branch information
jaehs6sam authored Aug 28, 2024
1 parent 3b2fa47 commit f75b95e
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/python_testing/TC_OCC_3_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
# [TC-OCC-3.2] test precedure step 3a, 3c

import logging
import time
import queue
import time

import chip.clusters as Clusters
from matter_testing_support import (ClusterAttributeChangeAccumulator, MatterBaseTest, TestStep, async_test_body,
await_sequence_of_reports, default_matter_test_main, AttributeValue)
from matter_testing_support import (AttributeValue, ClusterAttributeChangeAccumulator, MatterBaseTest, TestStep, async_test_body,
await_sequence_of_reports, default_matter_test_main)
from mobly import asserts


Expand Down Expand Up @@ -182,11 +182,14 @@ async def test_TC_OCC_3_2(self):
# Build list of expectations based on attributes present.
all_expected_final_values = [AttributeValue(endpoint_id, attribute=cluster.Attributes.HoldTime, value=hold_time_max)]
if expect_legacy_pir_timing:
all_expected_final_values.append(AttributeValue(endpoint_id, attribute=cluster.Attributes.PIROccupiedToUnoccupiedDelay, value=hold_time_max))
all_expected_final_values.append(AttributeValue(
endpoint_id, attribute=cluster.Attributes.PIROccupiedToUnoccupiedDelay, value=hold_time_max))
if expect_legacy_us_timing:
all_expected_final_values.append(AttributeValue(endpoint_id, attribute=cluster.Attributes.UltrasonicOccupiedToUnoccupiedDelay, value=hold_time_max))
all_expected_final_values.append(AttributeValue(
endpoint_id, attribute=cluster.Attributes.UltrasonicOccupiedToUnoccupiedDelay, value=hold_time_max))
if expect_legacy_phy_timing:
all_expected_final_values.append(AttributeValue(endpoint_id, attribute=cluster.Attributes.PhysicalContactOccupiedToUnoccupiedDelay, value=hold_time_max))
all_expected_final_values.append(AttributeValue(
endpoint_id, attribute=cluster.Attributes.PhysicalContactOccupiedToUnoccupiedDelay, value=hold_time_max))

# Wait for the reports to come.
attrib_listener.await_all_final_values_reported(all_expected_final_values, timeout_sec=post_prompt_settle_delay_seconds)
Expand Down

0 comments on commit f75b95e

Please sign in to comment.