@@ -45,7 +45,7 @@ async def test_TC_TIMESYNC_2_1(self):
45
45
46
46
self .print_step (1 , "Commissioning, already done" )
47
47
attributes = Clusters .TimeSynchronization .Attributes
48
-
48
+
49
49
self .print_step (2 , "Read Granularity attribute" )
50
50
granularity_dut = await self .read_ts_attribute_expect_success (endpoint = endpoint , attribute = attributes .Granularity )
51
51
asserts .assert_less (granularity_dut , Clusters .TimeSynchronization .Enums .GranularityEnum .kUnknownEnumValue ,
@@ -59,14 +59,13 @@ async def test_TC_TIMESYNC_2_1(self):
59
59
self .print_step (4 , "Read TrustedTimeSource" )
60
60
if self .supports_trusted_time_source :
61
61
trusted_time_source = await self .read_ts_attribute_expect_success (endpoint = endpoint ,
62
- attribute = attributes .TrustedTimeSource )
62
+ attribute = attributes .TrustedTimeSource )
63
63
if trusted_time_source is not NullValue :
64
64
asserts .assert_less_equal (trusted_time_source .fabricIndex , 0xFE ,
65
- "FabricIndex for the TrustedTimeSource is out of range" )
65
+ "FabricIndex for the TrustedTimeSource is out of range" )
66
66
asserts .assert_greater_equal (trusted_time_source .fabricIndex , 1 ,
67
- "FabricIndex for the TrustedTimeSource is out of range" )
67
+ "FabricIndex for the TrustedTimeSource is out of range" )
68
68
69
-
70
69
self .print_step (5 , "Read DefaultNTP" )
71
70
if self .supports_ntpc :
72
71
default_ntp = await self .read_ts_attribute_expect_success (endpoint = endpoint , attribute = attributes .DefaultNTP )
@@ -104,10 +103,10 @@ async def test_TC_TIMESYNC_2_1(self):
104
103
last_valid_starting = - 1
105
104
for dst in dst_dut :
106
105
asserts .assert_greater (dst .validStarting , last_valid_starting ,
107
- "DSTOffset list must be sorted by ValidStarting time" )
106
+ "DSTOffset list must be sorted by ValidStarting time" )
108
107
last_valid_starting = dst .validStarting
109
108
asserts .assert_greater_equal (dst .validStarting , last_valid_until ,
110
- "DSTOffset list must have every ValidStarting > ValidUntil of the previous entry" )
109
+ "DSTOffset list must have every ValidStarting > ValidUntil of the previous entry" )
111
110
last_valid_until = dst .validUntil
112
111
if dst .validUntil is NullValue or dst .validUntil is None :
113
112
asserts .assert_equal (dst , dst_dut [- 1 ], "DSTOffset list must have Null ValidUntil at the end" )
@@ -151,7 +150,7 @@ async def test_TC_TIMESYNC_2_1(self):
151
150
if self .supports_ntps :
152
151
# bool typechecking happens in the test read functions, so all we need to do here is do the read
153
152
await self .read_ts_attribute_expect_success (endpoint = endpoint , attribute = attributes .NTPServerAvailable )
154
-
153
+
155
154
self .print_step (12 , "Read TimeZoneListMaxSize" )
156
155
if self .supports_time_zone :
157
156
size = await self .read_ts_attribute_expect_success (endpoint = endpoint , attribute = attributes .TimeZoneListMaxSize )
@@ -168,5 +167,6 @@ async def test_TC_TIMESYNC_2_1(self):
168
167
if self .supports_ntpc :
169
168
await self .read_ts_attribute_expect_success (endpoint = endpoint , attribute = attributes .SupportsDNSResolve )
170
169
170
+
171
171
if __name__ == "__main__" :
172
172
default_matter_test_main ()
0 commit comments