Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bindings/python): Make sure read until EOF #4995

Merged
merged 6 commits into from
Aug 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion bindings/python/tests/test_read.py
Bicheka marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,14 @@ def test_sync_reader(service_name, operator, async_operator):
assert read_content == content

with operator.open(filename, "rb") as reader:
read_content = reader.read(size + 1)
read_content = bytearray()
while True:
chunk = 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
Loading