From 793ead5696dbb7e0897e459aed2cd64cd1e14788 Mon Sep 17 00:00:00 2001 From: Finn Bock Date: Sun, 9 Dec 2001 20:06:32 +0000 Subject: A workaround for the missing buffer() builtin in jython. This closes patch "[ #490850 ] Jython and test_StringIO". --- Lib/test/test_StringIO.py | 6 ++++++ 1 file changed, 6 insertions(+) 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 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 -- cgit v0.12