mirror of
https://github.com/micropython/micropython.git
synced 2025-08-13 14:11:58 +02:00
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>
12 lines
130 B
Plaintext
12 lines
130 B
Plaintext
b''
|
|
b'foobarfo'
|
|
b'foobarfoobar'
|
|
b'foobarfoobar'
|
|
b'foo'
|
|
<class 'int'>
|
|
OSError
|
|
OSError
|
|
writing bytearray(b'foobar')
|
|
flushed
|
|
flushed
|