Skip to content

Commit

Permalink
Fix python test
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo committed Sep 11, 2024
1 parent e99f072 commit ea32007
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion bindings/python/tests/test_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,14 @@ async def test_async_reader(service_name, operator, async_operator):
assert read_content == content

async with await async_operator.open(filename, "rb") as reader:
read_content = await reader.read(size + 1)
read_content = bytearray()
while True:
chunk = await reader.read(size + 1)
if not chunk:
break
read_content.extend(chunk)

read_content = bytes(read_content)
assert read_content is not None
assert read_content == content

Expand Down

0 comments on commit ea32007

Please sign in to comment.