Files
RustPython/tests/snippets/test_io.py
2019-03-18 20:00:55 +01:00

15 lines
197 B
Python

import io
f = io.StringIO()
f.write('bladibla')
assert f.getvalue() == 'bladibla'
# TODO:
# print('fubar', file=f, end='')
print(f.getvalue())
# TODO:
# assert f.getvalue() == 'bladiblafubar'