circuitpython/tests/basics/io_iobase.py
Jim Mussared 4216bc7d13 tests: Replace umodule with module everywhere.
This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-06-08 17:54:24 +10:00

16 lines
304 B
Python

import io
try:
io.IOBase
except AttributeError:
print('SKIP')
raise SystemExit
class MyIO(io.IOBase):
def write(self, buf):
# CPython and uPy pass in different types for buf (str vs bytearray)
print('write', len(buf))
return len(buf)
print('test', file=MyIO())