summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_StringIO.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2007-08-08 13:03:41 (GMT)
committerGeorg Brandl <georg@python.org>2007-08-08 13:03:41 (GMT)
commit9616444427cbbc5283f21a09ffa852ad21805588 (patch)
tree4e317891a8fc12947cad39710b84961ebc775221 /Lib/test/test_StringIO.py
parent52c0c368b9d279f4972e15f596616a436e5e2a6e (diff)
downloadcpython-9616444427cbbc5283f21a09ffa852ad21805588.zip
cpython-9616444427cbbc5283f21a09ffa852ad21805588.tar.gz
cpython-9616444427cbbc5283f21a09ffa852ad21805588.tar.bz2
Revert the fix for #1548891, it broke backwards compatibility with arbitrary read buffers.
Fixes #1730114.
Diffstat (limited to 'Lib/test/test_StringIO.py')
-rw-r--r--Lib/test/test_StringIO.py22
1 files changed, 0 insertions, 22 deletions
diff --git a/Lib/test/test_StringIO.py b/Lib/test/test_StringIO.py
index 9f79b02..58cbec0 100644
--- a/Lib/test/test_StringIO.py
+++ b/Lib/test/test_StringIO.py
@@ -121,28 +121,6 @@ class TestStringIO(TestGenericStringIO):
class TestcStringIO(TestGenericStringIO):
MODULE = cStringIO
- def test_unicode(self):
-
- if not test_support.have_unicode: return
-
- # The cStringIO module converts Unicode strings to character
- # strings when writing them to cStringIO objects.
- # Check that this works.
-
- f = self.MODULE.StringIO()
- f.write(unicode(self._line[:5]))
- s = f.getvalue()
- self.assertEqual(s, 'abcde')
- self.assertEqual(type(s), types.StringType)
-
- f = self.MODULE.StringIO(unicode(self._line[:5]))
- s = f.getvalue()
- self.assertEqual(s, 'abcde')
- self.assertEqual(type(s), types.StringType)
-
- self.assertRaises(UnicodeEncodeError, self.MODULE.StringIO,
- unicode('\xf4', 'latin-1'))
-
import sys
if sys.platform.startswith('java'):
# Jython doesn't have a buffer object, so we just do a useless