Skip to content

Commit 2e1cf1f

Browse files
authored
chore(v1): drop the duplicate status read-back close test (#1085)
Follow-up to #1067, where the maintainer noted that test_init.py is redundant because test_status.py already covers closing the status trait. Closing through PropertiesApi.close() is now covered in test_status.py as well.
1 parent e29a115 commit 2e1cf1f

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
@@ -1207,6 +1207,18 @@ async def test_close_cancels_pending_read_back(status_trait: StatusTrait, read_b
12071207
status_trait.refresh_and_notify.assert_not_awaited() # type: ignore[attr-defined]
12081208

12091209

1210+
async def test_properties_api_close_cancels_pending_read_back(
1211+
device: RoborockDevice, status_trait: StatusTrait, read_back: asyncio.Event
1212+
) -> None:
1213+
"""Closing the properties API stops a read-back that a push scheduled."""
1214+
assert device.v1_properties
1215+
status_trait.update_from_dps({RoborockDataProtocol.FAN_POWER: 101})
1216+
device.v1_properties.close()
1217+
1218+
await asyncio.sleep(READ_BACK_SETTLE)
1219+
status_trait.refresh_and_notify.assert_not_awaited() # type: ignore[attr-defined]
1220+
1221+
12101222
async def test_close_cancels_in_flight_read_back(status_trait: StatusTrait, read_back: asyncio.Event) -> None:
12111223
"""Closing while a read-back is running cancels it."""
12121224
started = asyncio.Event()

0 commit comments

Comments
 (0)