circuitpython/tests/basics/io_stringio_with.py
2023-08-22 12:57:47 -04:00

7 lines
105 B
Python

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