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: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=793ead5696dbb7e0897e459aed2cd64cd1e14788;p=python 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 33db4ba5bc..8b934fffcd 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