blob: 6e321e930f7e023c8a33202a1f903779cdc0e261 [file] [log] [blame]
Martin v. Löwisb96e0e52000-09-19 16:35:39 +00001# Tests StringIO and cStringIO
2
3import string
4
5def do_test(module):
6 s = (string.letters+'\n')*5
7 f = module.StringIO(s)
8 print f.read(10)
9 print f.readline()
10 print len(f.readlines(60))
11
12# Don't bother testing cStringIO without
13import StringIO, cStringIO
14do_test(StringIO)
15do_test(cStringIO)