diff options
Diffstat (limited to 'tests/io/stringio_with.py')
-rw-r--r-- | tests/io/stringio_with.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/io/stringio_with.py b/tests/io/stringio_with.py new file mode 100644 index 0000000000..becb564dfd --- /dev/null +++ b/tests/io/stringio_with.py @@ -0,0 +1,6 @@ +import _io as io + +# test __enter__/__exit__ +with io.StringIO() as b: + b.write("foo") + print(b.getvalue()) |