Describe the bug
|
with operator.open(filename, "rb") as reader: |
|
assert reader.readable() |
|
assert not reader.writable() |
|
assert not reader.closed |
|
|
|
read_content = reader.read() |
|
assert read_content is not None |
|
assert read_content == content |
|
|
|
with operator.open(filename, "rb") as reader: |
|
read_content = reader.read(size + 1) |
|
assert read_content is not None |
|
assert read_content == content |
There is no guarantee that read will always fill the read size. Users should keep calling read until EOF.
Steps to Reproduce
https://github.com/apache/opendal/actions/runs/10321553970/job/28574789953?pr=4989
The content is short than expected.
Expected Behavior
This test should pass stably.
Additional Context
No response
Are you willing to submit a PR to fix this bug?
Describe the bug
opendal/bindings/python/tests/test_read.py
Lines 47 to 59 in f43ab18
There is no guarantee that read will always fill the read size. Users should keep calling read until EOF.
Steps to Reproduce
https://github.com/apache/opendal/actions/runs/10321553970/job/28574789953?pr=4989
The content is short than expected.
Expected Behavior
This test should pass stably.
Additional Context
No response
Are you willing to submit a PR to fix this bug?