Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_StringIO.py @ 15058:3a04bebb666a legacy-trunk
Uncommented tests that failed for cStringIO,
Added missing clode to make the clode test test a close. ;)
| author | Jim Fulton <jim@zope.com> |
|---|---|
| date | Fri, 06 Oct 2000 19:21:32 +0000 |
| parents | 45967ff1b6dc |
| children | becd8a121464 |
line wrap: on
line diff
--- a/Lib/test/test_StringIO.py Fri Oct 06 18:46:22 2000 +0000 +++ b/Lib/test/test_StringIO.py Fri Oct 06 19:21:32 2000 +0000 @@ -14,23 +14,17 @@ 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
