Skip to content

Commit 7a1c968

Browse files
restyled-commitsj-ororke
authored andcommitted
Restyled by autopep8
1 parent c3d9b06 commit 7a1c968

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/python_testing/TC_TIMESYNC_2_1.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ async def test_TC_TIMESYNC_2_1(self):
4545

4646
self.print_step(1, "Commissioning, already done")
4747
attributes = Clusters.TimeSynchronization.Attributes
48-
48+
4949
self.print_step(2, "Read Granularity attribute")
5050
granularity_dut = await self.read_ts_attribute_expect_success(endpoint=endpoint, attribute=attributes.Granularity)
5151
asserts.assert_less(granularity_dut, Clusters.TimeSynchronization.Enums.GranularityEnum.kUnknownEnumValue,
@@ -59,14 +59,13 @@ async def test_TC_TIMESYNC_2_1(self):
5959
self.print_step(4, "Read TrustedTimeSource")
6060
if self.supports_trusted_time_source:
6161
trusted_time_source = await self.read_ts_attribute_expect_success(endpoint=endpoint,
62-
attribute=attributes.TrustedTimeSource)
62+
attribute=attributes.TrustedTimeSource)
6363
if trusted_time_source is not NullValue:
6464
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")
6666
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")
6868

69-
7069
self.print_step(5, "Read DefaultNTP")
7170
if self.supports_ntpc:
7271
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):
104103
last_valid_starting = -1
105104
for dst in dst_dut:
106105
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")
108107
last_valid_starting = dst.validStarting
109108
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")
111110
last_valid_until = dst.validUntil
112111
if dst.validUntil is NullValue or dst.validUntil is None:
113112
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):
151150
if self.supports_ntps:
152151
# bool typechecking happens in the test read functions, so all we need to do here is do the read
153152
await self.read_ts_attribute_expect_success(endpoint=endpoint, attribute=attributes.NTPServerAvailable)
154-
153+
155154
self.print_step(12, "Read TimeZoneListMaxSize")
156155
if self.supports_time_zone:
157156
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):
168167
if self.supports_ntpc:
169168
await self.read_ts_attribute_expect_success(endpoint=endpoint, attribute=attributes.SupportsDNSResolve)
170169

170+
171171
if __name__ == "__main__":
172172
default_matter_test_main()

src/python_testing/TC_TIMESYNC_2_2.py

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from matter_testing_support import MatterBaseTest, async_test_body, compare_time, default_matter_test_main, utc_time_in_matter_epoch
2424
from mobly import asserts
2525

26+
2627
class TC_TIMESYNC_2_2(MatterBaseTest):
2728
async def read_ts_attribute_expect_success(self, endpoint, attribute):
2829
cluster = Clusters.Objects.TimeSynchronization
@@ -78,5 +79,6 @@ async def test_TC_TIMESYNC_2_2(self):
7879
if utc_dut_initial is NullValue:
7980
asserts.assert_equal(source, Clusters.Objects.TimeSynchronization.Enums.TimeSourceEnum.kAdmin)
8081

82+
8183
if __name__ == "__main__":
8284
default_matter_test_main()

0 commit comments

Comments
 (0)