diff options
Diffstat (limited to 'Lib/test/test_StringIO.py')
-rw-r--r-- | Lib/test/test_StringIO.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Lib/test/test_StringIO.py b/Lib/test/test_StringIO.py new file mode 100644 index 0000000..6e321e9 --- /dev/null +++ b/Lib/test/test_StringIO.py @@ -0,0 +1,15 @@ +# Tests StringIO and cStringIO + +import string + +def do_test(module): + s = (string.letters+'\n')*5 + f = module.StringIO(s) + print f.read(10) + print f.readline() + print len(f.readlines(60)) + +# Don't bother testing cStringIO without +import StringIO, cStringIO +do_test(StringIO) +do_test(cStringIO) |