From: Philip Jenvey Date: Mon, 3 Aug 2009 01:06:11 +0000 (+0000) Subject: o handle array results for Binary and tweak test guards for oracle+zxjdbc X-Git-Tag: rel_0_6_6~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6cf14c2e4dca962edade9fcc75bff031da4418d;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git o handle array results for Binary and tweak test guards for oracle+zxjdbc --- diff --git a/test/dialect/test_oracle.py b/test/dialect/test_oracle.py index 730a3c7ace..53e0f9ec2f 100644 --- a/test/dialect/test_oracle.py +++ b/test/dialect/test_oracle.py @@ -9,6 +9,7 @@ from sqlalchemy.test.testing import eq_ from sqlalchemy.test.engines import testing_engine from sqlalchemy.dialects.oracle import cx_oracle, base as oracle from sqlalchemy.engine import default +from sqlalchemy.util import jython import os @@ -439,17 +440,18 @@ class BufferedColumnTest(TestBase, AssertsCompiledSQL): meta.drop_all() def test_fetch(self): - eq_( - binary_table.select().execute().fetchall() , - [(i, stream) for i in range(1, 11)], - ) + result = binary_table.select().execute().fetchall() + if jython: + result = [(i, value.tostring()) for i, value in result] + eq_(result, [(i, stream) for i in range(1, 11)]) + @testing.fails_on('+zxjdbc', 'FIXME: zxjdbc should support this') def test_fetch_single_arraysize(self): eng = testing_engine(options={'arraysize':1}) - eq_( - eng.execute(binary_table.select()).fetchall(), - [(i, stream) for i in range(1, 11)], - ) + result = eng.execute(binary_table.select()).fetchall(), + if jython: + result = [(i, value.tostring()) for i, value in result] + eq_(result, [(i, stream) for i in range(1, 11)]) class SequenceTest(TestBase, AssertsCompiledSQL): def test_basic(self): diff --git a/test/engine/test_execute.py b/test/engine/test_execute.py index d6c2af6f0b..fa1c6fc25e 100644 --- a/test/engine/test_execute.py +++ b/test/engine/test_execute.py @@ -66,7 +66,7 @@ class ExecuteTest(TestBase): assert res.fetchall() == [(1, "jack"), (2, "ed"), (3, "horse"), (4, 'sally')] conn.execute("delete from users") - @testing.fails_on_everything_except('sqlite', 'oracle') + @testing.fails_on_everything_except('sqlite', 'oracle+cx_oracle') def test_raw_named(self): for conn in (testing.db, testing.db.connect()): conn.execute("insert into users (user_id, user_name) values (:id, :name)", {'id':1, 'name':'jack'})