()
| 292 | |
| 293 | |
| 294 | def test_buffer_flush_stream(): |
| 295 | stream = PartialWriteStream() |
| 296 | buffer = Buffer.allocate(16) |
| 297 | output_stream = Buffer.wrap_output_stream(stream) |
| 298 | buffer.bind_output_stream(output_stream) |
| 299 | payload = b"stream-flush-buffer" |
| 300 | buffer.write_bytes(payload) |
| 301 | output_stream.force_flush() |
| 302 | assert stream.to_bytes() == payload |
| 303 | assert buffer.get_writer_index() == 0 |
| 304 | |
| 305 | |
| 306 | def test_wrap_output_stream_invalid_target_raises(): |
nothing calls this directly
no test coverage detected