Skip to content

Commit 5a3e97c

Browse files
committed
chore(v1): drop the duplicate status read-back close test
Follow-up to #1067 requested by the maintainer: test_status.py already covers closing the status trait, so test_init.py is redundant. Closing through PropertiesApi.close() is now covered there as well.
1 parent 4e06396 commit 5a3e97c

2 files changed

Lines changed: 12 additions & 55 deletions

File tree

‎tests/devices/traits/v1/test_init.py‎

Lines changed: 0 additions & 55 deletions
This file was deleted.

‎tests/devices/traits/v1/test_status.py‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,6 +1328,18 @@ async def test_close_cancels_pending_read_back(status_trait: StatusTrait, read_b
13281328
status_trait.refresh_and_notify.assert_not_awaited() # type: ignore[attr-defined]
13291329

13301330

1331+
async def test_properties_api_close_cancels_pending_read_back(
1332+
device: RoborockDevice, status_trait: StatusTrait, read_back: asyncio.Event
1333+
) -> None:
1334+
"""Closing the properties API stops a read-back that a push scheduled."""
1335+
assert device.v1_properties
1336+
status_trait.update_from_dps({RoborockDataProtocol.FAN_POWER: 101})
1337+
device.v1_properties.close()
1338+
1339+
await asyncio.sleep(READ_BACK_SETTLE)
1340+
status_trait.refresh_and_notify.assert_not_awaited() # type: ignore[attr-defined]
1341+
1342+
13311343
async def test_close_cancels_in_flight_read_back(status_trait: StatusTrait, read_back: asyncio.Event) -> None:
13321344
"""Closing while a read-back is running cancels it."""
13331345
started = asyncio.Event()

0 commit comments

Comments
 (0)