mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
In O_writelines: Replace use of string.joinfields with "".join.
This commit is contained in:
parent
6f8ee59653
commit
cafd495dfe
3 changed files with 20 additions and 9 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue