diff options
| author | Martin v. Löwis <martin@v.loewis.de> | 2000-09-19 16:35:39 +0000 |
|---|---|---|
| committer | Martin v. Löwis <martin@v.loewis.de> | 2000-09-19 16:35:39 +0000 |
| commit | b96e0e5e65e957235f2b4e4aeaf3041f590af014 (patch) | |
| tree | 84cc2d9822e65f0590d34548d10bd3137b563eaf | |
| parent | 89c528b02d5fad6a211f3f9e6915677e1baa7806 (diff) | |
| download | cpython-git-b96e0e5e65e957235f2b4e4aeaf3041f590af014.tar.gz | |
New test cases for the StringIO module
| -rw-r--r-- | Lib/test/output/test_StringIO | 9 | ||||
| -rw-r--r-- | Lib/test/test_StringIO.py | 15 |
2 files changed, 24 insertions, 0 deletions
diff --git a/Lib/test/output/test_StringIO b/Lib/test/output/test_StringIO new file mode 100644 index 0000000000..505023a7bc --- /dev/null +++ b/Lib/test/output/test_StringIO @@ -0,0 +1,9 @@ +test_StringIO +abcdefghij +klmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ + +2 +abcdefghij +klmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ + +2 diff --git a/Lib/test/test_StringIO.py b/Lib/test/test_StringIO.py new file mode 100644 index 0000000000..6e321e930f --- /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) |
