@@ -332,7 +332,7 @@ async def test_msg_properties(self) -> None:
332332 )
333333 assert unix_timestamp .serialize () == b"4E08478A"
334334 with pytest .raises (pw_exceptions .MessageError ):
335- assert unix_timestamp .value == dt (2011 , 6 , 27 , 9 , 4 , 10 , tzinfo = UTC )
335+ unix_timestamp .value == dt (2011 , 6 , 27 , 9 , 4 , 10 , tzinfo = UTC )
336336 unix_timestamp .deserialize (b"4E08478A" )
337337 assert unix_timestamp .value == dt (2011 , 6 , 27 , 9 , 4 , 10 , tzinfo = UTC )
338338
@@ -343,11 +343,11 @@ async def test_stick_connect_without_port(self) -> None:
343343 assert stick .nodes == {}
344344 assert stick .joined_nodes is None
345345 with pytest .raises (pw_exceptions .StickError ):
346- assert stick .mac_stick
346+ stick .mac_stick
347347 with pytest .raises (pw_exceptions .StickError ):
348- assert stick .mac_coordinator
348+ stick .mac_coordinator
349349 with pytest .raises (pw_exceptions .StickError ):
350- assert stick .network_id
350+ stick .network_id
351351 assert not stick .network_discovered
352352 assert not stick .network_state
353353
@@ -1910,7 +1910,7 @@ async def load_callback(event: pw_api.NodeEvent, mac: str) -> None: # type: ign
19101910 async def test_sed_node (self , monkeypatch : pytest .MonkeyPatch ) -> None : # noqa: PLR0915
19111911 """Testing properties of SED."""
19121912
1913- def fake_cache (dummy : object , setting : str ) -> str | None : # noqa: PLR0911
1913+ def fake_cache (dummy : object , setting : str ) -> str | bool | None : # noqa: PLR0911
19141914 """Fake cache retrieval."""
19151915 if setting == pw_node .CACHE_FIRMWARE :
19161916 return "2011-6-27-8-55-44"
@@ -1973,9 +1973,9 @@ async def load_callback(event: pw_api.NodeEvent, mac: str) -> None: # type: ign
19731973 assert test_sed .awake_duration == 20
19741974 assert test_sed .battery_config .awake_duration == 20
19751975 with pytest .raises (ValueError ):
1976- assert await test_sed .set_awake_duration (0 )
1976+ await test_sed .set_awake_duration (0 )
19771977 with pytest .raises (ValueError ):
1978- assert await test_sed .set_awake_duration (256 )
1978+ await test_sed .set_awake_duration (256 )
19791979 assert await test_sed .set_awake_duration (10 )
19801980 assert test_sed .battery_config .dirty
19811981 assert await test_sed .set_awake_duration (15 )
@@ -2016,9 +2016,9 @@ async def load_callback(event: pw_api.NodeEvent, mac: str) -> None: # type: ign
20162016 assert test_sed .maintenance_interval == 60
20172017 assert test_sed .battery_config .maintenance_interval == 60
20182018 with pytest .raises (ValueError ):
2019- assert await test_sed .set_maintenance_interval (0 )
2019+ await test_sed .set_maintenance_interval (0 )
20202020 with pytest .raises (ValueError ):
2021- assert await test_sed .set_maintenance_interval (1500 )
2021+ await test_sed .set_maintenance_interval (1500 )
20222022 assert not await test_sed .set_maintenance_interval (60 )
20232023 assert not test_sed .battery_config .dirty
20242024 assert await test_sed .set_maintenance_interval (30 )
@@ -2040,9 +2040,9 @@ async def load_callback(event: pw_api.NodeEvent, mac: str) -> None: # type: ign
20402040 assert test_sed .clock_interval == 12600
20412041 assert test_sed .battery_config .clock_interval == 12600
20422042 with pytest .raises (ValueError ):
2043- assert await test_sed .set_clock_interval (0 )
2043+ await test_sed .set_clock_interval (0 )
20442044 with pytest .raises (ValueError ):
2045- assert await test_sed .set_clock_interval (65536 )
2045+ await test_sed .set_clock_interval (65536 )
20462046 assert not await test_sed .set_clock_interval (12600 )
20472047 assert not test_sed .battery_config .dirty
20482048 assert await test_sed .set_clock_interval (15000 )
@@ -2083,9 +2083,9 @@ async def load_callback(event: pw_api.NodeEvent, mac: str) -> None: # type: ign
20832083 assert test_sed .sleep_duration == 60
20842084 assert test_sed .battery_config .sleep_duration == 60
20852085 with pytest .raises (ValueError ):
2086- assert await test_sed .set_sleep_duration (0 )
2086+ await test_sed .set_sleep_duration (0 )
20872087 with pytest .raises (ValueError ):
2088- assert await test_sed .set_sleep_duration (65536 )
2088+ await test_sed .set_sleep_duration (65536 )
20892089 assert not await test_sed .set_sleep_duration (60 )
20902090 assert await test_sed .set_sleep_duration (120 )
20912091 assert test_sed .battery_config .dirty
@@ -2106,7 +2106,7 @@ async def load_callback(event: pw_api.NodeEvent, mac: str) -> None: # type: ign
21062106 async def test_scan_node (self , monkeypatch : pytest .MonkeyPatch ) -> None : # noqa: PLR0915
21072107 """Testing properties of scan."""
21082108
2109- def fake_cache (dummy : object , setting : str ) -> str | None : # noqa: PLR0911 PLR0912
2109+ def fake_cache (dummy : object , setting : str ) -> str | bool | None : # noqa: PLR0911 PLR0912
21102110 """Fake cache retrieval."""
21112111 if setting == pw_node .CACHE_FIRMWARE :
21122112 return "2011-6-27-8-55-44"
@@ -2179,9 +2179,9 @@ async def load_callback(event: pw_api.NodeEvent, mac: str) -> None: # type: ign
21792179 assert test_scan .reset_timer == 10
21802180 assert test_scan .motion_config .reset_timer == 10
21812181 with pytest .raises (ValueError ):
2182- assert await test_scan .set_motion_reset_timer (0 )
2182+ await test_scan .set_motion_reset_timer (0 )
21832183 with pytest .raises (ValueError ):
2184- assert await test_scan .set_motion_reset_timer (256 )
2184+ await test_scan .set_motion_reset_timer (256 )
21852185 assert not await test_scan .set_motion_reset_timer (10 )
21862186 assert not test_scan .motion_config .dirty
21872187 assert await test_scan .set_motion_reset_timer (15 )
@@ -2308,7 +2308,7 @@ async def load_callback(event: pw_api.NodeEvent, mac: str) -> None: # type: ign
23082308 async def test_switch_node (self , monkeypatch : pytest .MonkeyPatch ) -> None :
23092309 """Testing properties of switch."""
23102310
2311- def fake_cache (dummy : object , setting : str ) -> str | None : # noqa: PLR0911
2311+ def fake_cache (dummy : object , setting : str ) -> str | bool | None : # noqa: PLR0911
23122312 """Fake cache retrieval."""
23132313 if setting == pw_node .CACHE_FIRMWARE :
23142314 return "2011-5-13-7-26-54"
@@ -2411,7 +2411,7 @@ async def test_node_discovery_and_load( # noqa: PLR0915
24112411 ) -> None :
24122412 """Testing discovery of nodes."""
24132413
2414- def fake_cache (dummy : object , setting : str ) -> str | None : # noqa: PLR0911
2414+ def fake_cache (dummy : object , setting : str ) -> str | bool | None : # noqa: PLR0911
24152415 """Fake cache retrieval."""
24162416 if setting == pw_node .CACHE_FIRMWARE :
24172417 return "2011-5-13-7-26-54"
0 commit comments