Commit b96e0e5e authored by Martin v. Löwis's avatar Martin v. Löwis

New test cases for the StringIO module

parent 89c528b0
test_StringIO
abcdefghij
klmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
2
abcdefghij
klmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
2
# 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)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment