Files
micropython/tests/micropython
Jeff Epler 5b127f022e py/modio: Error out on over-long read()/write() in user IO code.
It is a mistake in Python code if the result of readinto()/write()
is more bytes than requested. This can lead to misbehavior
e.g., in mp_stream_rw if the invariant is not respected.

CPython appears to largely ignore the values returned from
readinto()/write(), at least from `print()` & `json.load()`.
Consequently, an expected output file is needed for the
new test.

Closes: #18845

Signed-off-by: Jeff Epler <jepler@unpythonic.net>
2026-04-15 15:41:48 +10:00
..