aboutsummaryrefslogtreecommitdiff
path: root/tests/io
diff options
context:
space:
mode:
authorDamien George2015-04-04 22:05:30 +0100
committerDamien George2015-04-04 22:05:30 +0100
commit9dd36404646f857c4f250537bac0d9a8ad041d25 (patch)
treec6509bcd3c7d5c2e67332110c582df2b5a5c669f /tests/io
parent7e758b1cf878312cab5d9d2825b36e7235ea10a3 (diff)
tests: Add missing tests for builtins, and many other things.
Diffstat (limited to 'tests/io')
-rw-r--r--tests/io/stringio1.py1
-rw-r--r--tests/io/stringio_with.py6
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/io/stringio1.py b/tests/io/stringio1.py
index dae0187f8..22f561f29 100644
--- a/tests/io/stringio1.py
+++ b/tests/io/stringio1.py
@@ -1,6 +1,7 @@
import _io as io
a = io.StringIO()
+print('io.StringIO' in repr(a))
print(a.getvalue())
print(a.read())
diff --git a/tests/io/stringio_with.py b/tests/io/stringio_with.py
new file mode 100644
index 000000000..becb564df
--- /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())