A workaround for the missing buffer() builtin in jython.
This closes patch "[ #490850 ] Jython and test_StringIO".
diff --git a/Lib/test/test_StringIO.py b/Lib/test/test_StringIO.py
index 33db4ba..8b934ff 100644
--- a/Lib/test/test_StringIO.py
+++ b/Lib/test/test_StringIO.py
@@ -74,6 +74,12 @@
class TestcStringIO(TestGenericStringIO):
MODULE = cStringIO
+import sys
+if sys.platform.startswith('java'):
+ # Jython doesn't have a buffer object, so we just do a useless
+ # fake of the buffer tests.
+ buffer = str
+
class TestBufferStringIO(TestStringIO):
constructor = buffer