micropython/tests/basics/io_stringio_with.py

6 lines
104 B
Python

import io
# test __enter__/__exit__
with io.StringIO() as b:
b.write("foo")
print(b.getvalue())