-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
bugSomething isn't workingSomething isn't working
Description
When OverlayStream is initialized without specifying the size, the read() call will return an empty buffer.
The following test case fails:
def test_overlay_stream_no_size() -> None:
data = b"1234567890"
buf = io.BytesIO(data)
# Initialize without a size
overlay = stream.OverlayStream(buf)
# read exactly the size of the buffer
overlay.seek(0)
assert overlay.read(10) == data
# read until EOF
overlay.seek(0)
assert overlay.read() == data
# read until EOF using -1
overlay.seek(0)
assert overlay.read(-1) == dataMetadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working