summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_StringIO.py
diff options
context:
space:
mode:
authorJim Fulton <jim@zope.com>2000-10-06 19:21:32 (GMT)
committerJim Fulton <jim@zope.com>2000-10-06 19:21:32 (GMT)
commitd1229f56512c0d8dc3fd70889f1533a6fa0ece33 (patch)
treed0e8feeff29eb1eab542440625be5c8587286f70 /Lib/test/test_StringIO.py
parent6d699ca699fedec90a7e7d59d02faec8978a976f (diff)
downloadcpython-d1229f56512c0d8dc3fd70889f1533a6fa0ece33.zip
cpython-d1229f56512c0d8dc3fd70889f1533a6fa0ece33.tar.gz
cpython-d1229f56512c0d8dc3fd70889f1533a6fa0ece33.tar.bz2
Uncommented tests that failed for cStringIO,
Added missing clode to make the clode test test a close. ;)
Diffstat (limited to 'Lib/test/test_StringIO.py')
-rw-r--r--Lib/test/test_StringIO.py28
1 files changed, 11 insertions, 17 deletions
diff --git a/Lib/test/test_StringIO.py b/Lib/test/test_StringIO.py
index 2d9f2c1..f2d6dbf 100644
--- a/Lib/test/test_StringIO.py
+++ b/Lib/test/test_StringIO.py
@@ -14,23 +14,17 @@ def do_test(module):
f.seek(10)
f.truncate()
print `f.getvalue()`
- # This test fails for cStringIO; reported as SourceForge bug #115531;
- # please uncomment this test when that bug is fixed.
- # http://sourceforge.net/bugs/?func=detailbug&bug_id=115531&group_id=5470
-## f.seek(0)
-## f.truncate(5)
-## print `f.getvalue()`
-
- # This test fails for cStringIO; reported as SourceForge bug #115530;
- # please uncomment this test when that bug is fixed.
- # http://sourceforge.net/bugs/?func=detailbug&bug_id=115530&group_id=5470
-## try:
-## f.write("frobnitz")
-## except ValueError, e:
-## print "Caught expected ValueError writing to closed StringIO:"
-## print e
-## else:
-## print "Failed to catch ValueError writing to closed StringIO."
+ f.seek(0)
+ f.truncate(5)
+ print `f.getvalue()`
+ f.close()
+ try:
+ f.write("frobnitz")
+ except ValueError, e:
+ print "Caught expected ValueError writing to closed StringIO:"
+ print e
+ else:
+ print "Failed to catch ValueError writing to closed StringIO."
# Don't bother testing cStringIO without
import StringIO, cStringIO