Update of /cvsroot/python/python/dist/src/Lib/test In directory usw-pr-cvs1:/tmp/cvs-serv4886/Lib/test Modified Files: test_StringIO.py Log Message: Restore Python 2.1 StringIO.py behaviour: support concatenating Unicode string snippets to larger Unicode strings. This fix should also go into Python 2.2.1. Index: test_StringIO.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_StringIO.py,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** test_StringIO.py 2001/12/09 20:06:32 1.10 --- test_StringIO.py 2002/01/06 17:15:05 1.11 *************** *** 72,75 **** --- 72,90 ---- MODULE = StringIO + def test_unicode(self): + + # The StringIO module also supports concatenating Unicode + # snippets to larger Unicode strings. This is tested by this + # method. Note that cStringIO does not support this extension. + + f = self.MODULE.StringIO() + f.write(self._line[:6]) + f.seek(3) + f.write(unicode(self._line[20:26])) + f.write(unicode(self._line[52])) + s = f.getvalue() + self.assertEqual(s, unicode('abcuvwxyz!')) + self.assertEqual(type(s), types.UnicodeType) + class TestcStringIO(TestGenericStringIO): MODULE = cStringIO
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4