micropython/tests/io/stringio_with.py

7 lines
112 B
Python
Raw Normal View History

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