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 2 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
7 changes: 7 additions & 0 deletions 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 @@ -57,6 +57,13 @@ def test_sync_reader(service_name, operator, async_operator):
read_content = reader.read(size + 1)
assert read_content is not None
assert read_content == content
read_content_eof = b""
while True:
chunk = reader.read(size)
if not chunk:
break
read_content_eof += chunk
assert read_content == content

buf = bytearray(1)
with operator.open(filename, "rb") as reader:
Expand Down
Loading