Skip to content

Commit 8e1f7e9

Browse files
committed
Fix polling snapshot test types
1 parent be308fe commit 8e1f7e9

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

tests/unit/test_poll_snapshot.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ async def test_failed_group_discards_all_partial_values() -> None:
6060

6161
async def read_block(data: dict[str, Any], block: Any, typ: str) -> bool:
6262
data["raw"] = block.start * 10
63-
return block.start == 1
63+
return bool(block.start == 1)
6464

6565
hub.async_read_modbus_block = read_block
6666
original_data_object = hub.data
@@ -193,12 +193,13 @@ async def read_group(group: Any) -> bool:
193193
first_group = make_group()
194194
second_group = make_group()
195195

196-
results = await asyncio.gather(
196+
first_result, second_result = await asyncio.gather(
197197
hub.async_read_modbus_data(first_group),
198198
hub.async_read_modbus_data(second_group),
199199
)
200200

201-
assert results == [True, True]
201+
assert first_result is True
202+
assert second_result is True
202203
assert maximum_active_reads == 1
203204

204205

0 commit comments

Comments
 (0)