diff options
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/output/test_StringIO | 2 | ||||
-rw-r--r-- | Lib/test/test_StringIO.py | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/Lib/test/output/test_StringIO b/Lib/test/output/test_StringIO index e2b2893..992d534 100644 --- a/Lib/test/output/test_StringIO +++ b/Lib/test/output/test_StringIO @@ -4,6 +4,7 @@ klmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ 2 'abcuvwxyz!' +'abc' 'abcdefghij' 'abcde' Caught expected ValueError writing to closed StringIO: @@ -13,6 +14,7 @@ klmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ 2 'abcuvwxyz!' +'abc' 'abcdefghij' 'abcde' Caught expected ValueError writing to closed StringIO: diff --git a/Lib/test/test_StringIO.py b/Lib/test/test_StringIO.py index ea237cd..8d3c851 100644 --- a/Lib/test/test_StringIO.py +++ b/Lib/test/test_StringIO.py @@ -14,6 +14,13 @@ def do_test(module): f.write('!') print `f.getvalue()` f.close() + + f = module.StringIO() + f.writelines(["a", "b", "c"]) + f.seek(0) + print `f.getvalue()` + f.close() + f = module.StringIO() f.write(s) f.seek(10) @@ -31,7 +38,6 @@ def do_test(module): else: print "Failed to catch ValueError writing to closed StringIO." -# Don't bother testing cStringIO without import StringIO, cStringIO do_test(StringIO) do_test(cStringIO) |