Issue1227

classification
Title: The cStringIO.StringIO.write implementation does not handle write/seek/write's correctly.
Type: behaviour Severity: major
Components: Library Versions: 2.5.1
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: zyasoft Nosy List: njoyce, thijs, zyasoft
Priority: Keywords: patch

Created on 2009-01-11.03:21:56 by njoyce, last changed 2009-01-17.18:16:11 by zyasoft.

Files
File name Uploaded Description Edit Remove
cStringIO-write-seek-write-and-tests.diff njoyce, 2009-01-11.03:21:55 New cStringIO.StringIO.write implementation (ported from CPython stdlib) with tests
Messages
msg4024 (view) Author: Nick Joyce (njoyce) Date: 2009-01-11.03:21:55
An example:

import cStringIO

buf = cStringIO.StringIO()
buf.write('hello')
buf.seek(2)
buf.write('hi')

assert buf.getvalue() == 'hehio'

I have ported StringIO.write method in CPythonLib/StringIO.py to cStringIO.java and added the 
above test to test_StringIO_jy.py

When this issue and http://bugs.jython.org/issue1217 have been resolved, there will only be 2 
failing tests in the PyAMF test suite - check http://pyamf.org/pyamf/branches/impl-indep-test-
suite-343.
msg4025 (view) Author: Nick Joyce (njoyce) Date: 2009-01-11.15:36:51
That last link should be:
http://pyamf.org/browser/pyamf/branches/impl-indep-test-suite-343
msg4052 (view) Author: Jim Baker (zyasoft) Date: 2009-01-17.18:16:10
Fixed in r5937 with the provided patch by njoyce. Thanks for finding and
fixing!
History
Date User Action Args
2009-01-17 18:16:11zyasoftsetstatus: open -> closed
resolution: fixed
messages: + msg4052
2009-01-16 17:49:17zyasoftsetassignee: zyasoft
nosy: + zyasoft
2009-01-11 15:42:46thijssetnosy: + thijs
2009-01-11 15:36:51njoycesetmessages: + msg4025
2009-01-11 03:21:56njoycecreate