From b96e0e5e65e957235f2b4e4aeaf3041f590af014 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Tue, 19 Sep 2000 16:35:39 +0000 Subject: New test cases for the StringIO module --- Lib/test/output/test_StringIO | 9 +++++++++ Lib/test/test_StringIO.py | 15 +++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 Lib/test/output/test_StringIO create mode 100644 Lib/test/test_StringIO.py diff --git a/Lib/test/output/test_StringIO b/Lib/test/output/test_StringIO new file mode 100644 index 0000000..505023a --- /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 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) -- cgit v0.12