mirror of
https://github.com/python/cpython.git
synced 2025-09-02 15:07:53 +00:00
Uncommented tests that failed for cStringIO,
Added missing clode to make the clode test test a close. ;)
This commit is contained in:
parent
6d699ca699
commit
d1229f5651
1 changed files with 11 additions and 17 deletions
|
@ -14,23 +14,17 @@ def do_test(module):
|
||||||
f.seek(10)
|
f.seek(10)
|
||||||
f.truncate()
|
f.truncate()
|
||||||
print `f.getvalue()`
|
print `f.getvalue()`
|
||||||
# This test fails for cStringIO; reported as SourceForge bug #115531;
|
f.seek(0)
|
||||||
# please uncomment this test when that bug is fixed.
|
f.truncate(5)
|
||||||
# http://sourceforge.net/bugs/?func=detailbug&bug_id=115531&group_id=5470
|
print `f.getvalue()`
|
||||||
## f.seek(0)
|
f.close()
|
||||||
## f.truncate(5)
|
try:
|
||||||
## print `f.getvalue()`
|
f.write("frobnitz")
|
||||||
|
except ValueError, e:
|
||||||
# This test fails for cStringIO; reported as SourceForge bug #115530;
|
print "Caught expected ValueError writing to closed StringIO:"
|
||||||
# please uncomment this test when that bug is fixed.
|
print e
|
||||||
# http://sourceforge.net/bugs/?func=detailbug&bug_id=115530&group_id=5470
|
else:
|
||||||
## try:
|
print "Failed to catch ValueError writing to closed StringIO."
|
||||||
## 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
|
# Don't bother testing cStringIO without
|
||||||
import StringIO, cStringIO
|
import StringIO, cStringIO
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue