@@ -70,6 +70,7 @@ def bms_adv(request: pytest.FixtureRequest) -> BluetoothServiceInfoBleak:
7070
7171
7272@pytest .mark .usefixtures ("enable_bluetooth" )
73+ @pytest .mark .parametrize ("expected_lingering_timers" , [True ])
7374async def test_bluetooth_discovery (
7475 monkeypatch : pytest .MonkeyPatch ,
7576 hass : HomeAssistant ,
@@ -136,6 +137,7 @@ async def test_bluetooth_discovery(
136137 ids = ["minimal" , "full" ],
137138)
138139@pytest .mark .usefixtures ("enable_bluetooth" , "patch_default_bleak_client" )
140+ @pytest .mark .parametrize ("expected_lingering_timers" , [True ])
139141async def test_device_setup (
140142 monkeypatch : pytest .MonkeyPatch ,
141143 bt_discovery : BluetoothServiceInfoBleak ,
@@ -190,6 +192,7 @@ async def test_device_setup(
190192
191193
192194@pytest .mark .usefixtures ("enable_bluetooth" )
195+ @pytest .mark .parametrize ("expected_lingering_timers" , [True ])
193196async def test_device_not_supported (
194197 bt_discovery_notsupported : BluetoothServiceInfoBleak , hass : HomeAssistant
195198) -> None :
@@ -206,6 +209,7 @@ async def test_device_not_supported(
206209
207210
208211@pytest .mark .usefixtures ("enable_bluetooth" )
212+ @pytest .mark .parametrize ("expected_lingering_timers" , [True ])
209213async def test_user_already_configured (hass : HomeAssistant ) -> None :
210214 """Test that same device cannot be added twice."""
211215
@@ -228,6 +232,7 @@ async def test_user_already_configured(hass: HomeAssistant) -> None:
228232
229233
230234@pytest .mark .usefixtures ("enable_bluetooth" )
235+ @pytest .mark .parametrize ("expected_lingering_timers" , [True ])
231236async def test_bluetooth_already_configured (
232237 hass : HomeAssistant , bt_discovery : BluetoothServiceInfoBleak
233238) -> None :
@@ -249,6 +254,7 @@ async def test_bluetooth_already_configured(
249254
250255
251256@pytest .mark .usefixtures ("enable_bluetooth" , "patch_default_bleak_client" )
257+ @pytest .mark .parametrize ("expected_lingering_timers" , [True ])
252258async def test_bluetooth_confirm_entry_added_during_flow (
253259 monkeypatch : pytest .MonkeyPatch ,
254260 bt_discovery : BluetoothServiceInfoBleak ,
@@ -286,6 +292,7 @@ async def test_bluetooth_confirm_entry_added_during_flow(
286292
287293
288294@pytest .mark .usefixtures ("enable_bluetooth" , "patch_default_bleak_client" )
295+ @pytest .mark .parametrize ("expected_lingering_timers" , [True ])
289296async def test_async_setup_entry (
290297 monkeypatch : pytest .MonkeyPatch ,
291298 bms_fixture : str ,
@@ -311,6 +318,7 @@ async def test_async_setup_entry(
311318
312319
313320@pytest .mark .usefixtures ("enable_bluetooth" )
321+ @pytest .mark .parametrize ("expected_lingering_timers" , [True ])
314322async def test_setup_entry_missing_unique_id (
315323 bms_fixture : str , hass : HomeAssistant
316324) -> None :
@@ -328,6 +336,7 @@ async def test_setup_entry_missing_unique_id(
328336@pytest .mark .usefixtures (
329337 "enable_bluetooth" , "patch_default_bleak_client" , "patch_entity_enabled_default"
330338)
339+ @pytest .mark .parametrize ("expected_lingering_timers" , [True ])
331340async def test_user_setup (
332341 monkeypatch : pytest .MonkeyPatch ,
333342 bt_discovery : BluetoothServiceInfoBleak ,
@@ -385,6 +394,7 @@ async def test_user_setup(
385394
386395
387396@pytest .mark .usefixtures ("enable_bluetooth" )
397+ @pytest .mark .parametrize ("expected_lingering_timers" , [True ])
388398async def test_user_setup_invalid (
389399 bt_discovery_notsupported : BluetoothServiceInfoBleak , hass : HomeAssistant
390400) -> None :
@@ -398,6 +408,7 @@ async def test_user_setup_invalid(
398408
399409
400410@pytest .mark .usefixtures ("enable_bluetooth" )
411+ @pytest .mark .parametrize ("expected_lingering_timers" , [True ])
401412async def test_user_setup_double_configure (
402413 monkeypatch : pytest .MonkeyPatch ,
403414 bt_discovery : BluetoothServiceInfoBleak ,
@@ -422,6 +433,7 @@ def patch_async_current_ids(_self, include_ignore: bool = True) -> set[str | Non
422433
423434
424435@pytest .mark .usefixtures ("enable_bluetooth" )
436+ @pytest .mark .parametrize ("expected_lingering_timers" , [True ])
425437async def test_options_flow (
426438 monkeypatch : pytest .MonkeyPatch , hass : HomeAssistant
427439) -> None :
@@ -461,6 +473,7 @@ async def test_options_flow(
461473
462474
463475@pytest .mark .usefixtures ("enable_bluetooth" )
476+ @pytest .mark .parametrize ("expected_lingering_timers" , [True ])
464477async def test_options_flow_no_secret (hass : HomeAssistant ) -> None :
465478 """Test if options flow for BMS without secret."""
466479
@@ -487,6 +500,7 @@ async def test_options_flow_no_secret(hass: HomeAssistant) -> None:
487500
488501@pytest .mark .usefixtures ("enable_bluetooth" , "patch_default_bleak_client" )
489502@pytest .mark .parametrize ("keep_alive" , [True , False ])
503+ @pytest .mark .parametrize ("expected_lingering_timers" , [True ])
490504async def test_options_effect (
491505 monkeypatch : pytest .MonkeyPatch ,
492506 hass : HomeAssistant ,
@@ -551,6 +565,7 @@ def mock_bms_init(
551565
552566
553567@pytest .mark .usefixtures ("enable_bluetooth" )
568+ @pytest .mark .parametrize ("expected_lingering_timers" , [True ])
554569async def test_invalid_options_flow (hass : HomeAssistant ) -> None :
555570 """Test config options flow for unsupported BMS type."""
556571
@@ -569,6 +584,7 @@ async def test_invalid_options_flow(hass: HomeAssistant) -> None:
569584
570585
571586@pytest .mark .usefixtures ("enable_bluetooth" )
587+ @pytest .mark .parametrize ("expected_lingering_timers" , [True ])
572588async def test_no_migration (bms_fixture : str , hass : HomeAssistant ) -> None :
573589 """Test that entries of correct version are kept."""
574590
@@ -586,6 +602,7 @@ async def test_no_migration(bms_fixture: str, hass: HomeAssistant) -> None:
586602
587603
588604@pytest .mark .usefixtures ("enable_bluetooth" )
605+ @pytest .mark .parametrize ("expected_lingering_timers" , [True ])
589606async def test_migrate_entry_future_version (hass : HomeAssistant ) -> None :
590607 """Test migrating entries from future version."""
591608
@@ -601,6 +618,7 @@ async def test_migrate_entry_future_version(hass: HomeAssistant) -> None:
601618
602619
603620@pytest .mark .usefixtures ("enable_bluetooth" )
621+ @pytest .mark .parametrize ("expected_lingering_timers" , [True ])
604622async def test_migrate_invalid_v_0_1 (bms_fixture : str , hass : HomeAssistant ) -> None :
605623 """Test migrating an invalid entry in version 0.1."""
606624
@@ -616,6 +634,7 @@ async def test_migrate_invalid_v_0_1(bms_fixture: str, hass: HomeAssistant) -> N
616634
617635
618636@pytest .mark .usefixtures ("enable_bluetooth" , "patch_default_bleak_client" )
637+ @pytest .mark .parametrize ("expected_lingering_timers" , [True ])
619638async def test_migrate_entry_from_v0_1 (
620639 monkeypatch : pytest .MonkeyPatch ,
621640 mock_config_v0_1 : MockConfigEntry ,
@@ -643,6 +662,7 @@ async def test_migrate_entry_from_v0_1(
643662
644663
645664@pytest .mark .usefixtures ("enable_bluetooth" , "patch_default_bleak_client" )
665+ @pytest .mark .parametrize ("expected_lingering_timers" , [True ])
646666async def test_migrate_entry_from_v1_0 (
647667 monkeypatch : pytest .MonkeyPatch ,
648668 bt_discovery : BluetoothServiceInfoBleak ,
@@ -671,6 +691,7 @@ async def test_migrate_entry_from_v1_0(
671691
672692@pytest .mark .usefixtures ("enable_bluetooth" , "patch_default_bleak_client" )
673693@pytest .mark .parametrize ("bms_fixture" , ["dummy_bms" , "ective_bms" ])
694+ @pytest .mark .parametrize ("expected_lingering_timers" , [True ])
674695async def test_migrate_entry_from_v2_0 (
675696 monkeypatch : pytest .MonkeyPatch ,
676697 bt_discovery : BluetoothServiceInfoBleak ,
@@ -701,6 +722,7 @@ async def test_migrate_entry_from_v2_0(
701722
702723
703724@pytest .mark .usefixtures ("enable_bluetooth" )
725+ @pytest .mark .parametrize ("expected_lingering_timers" , [True ])
704726@pytest .mark .parametrize (
705727 ("unique_id_old" , "unique_id_new" ),
706728 [
0 commit comments