Files
micropython/tests/basics/io_buffered_writer.py.exp
Jeff Epler b6b7d64bd9 py/modio: Fix the case where write fails in BufferedWriter.flush.
Previously, there was no test coverage of the "write failed" path.  In
fact, the assertion would fire instead of gracefully raising a Python
exception.

Slightly re-organize the code to place the assertion later.  Add a test
case which exercises all paths, and update the expected output.

Signed-off-by: Jeff Epler <jepler@gmail.com>
2025-06-17 10:15:59 +10:00

12 lines
130 B
Plaintext

b''
b'foobarfo'
b'foobarfoobar'
b'foobarfoobar'
b'foo'
<class 'int'>
OSError
OSError
writing bytearray(b'foobar')
flushed
flushed