blob: 6e321e930f7e023c8a33202a1f903779cdc0e261 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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)
|