From: Finn Bock Date: Sun, 9 Dec 2001 20:06:32 +0000 (+0000) Subject: A workaround for the missing buffer() builtin in jython. X-Git-Tag: v2.2.1c1~454 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=793ead5696dbb7e0897e459aed2cd64cd1e14788;p=thirdparty%2FPython%2Fcpython.git 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 33db4ba5bcd7..8b934fffcdfe 100644 --- a/Lib/test/test_StringIO.py +++ b/Lib/test/test_StringIO.py @@ -74,6 +74,12 @@ class TestStringIO(TestGenericStringIO): 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