From 32a1db368599f6f3dbb3765ef5f11640d1725672 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 1 Feb 2014 13:22:43 -0500 Subject: [PATCH] add a skip for oracle on this --- lib/sqlalchemy/testing/requirements.py | 24 ++++++++++++++++++++++++ test/requirements.py | 21 +++++++++++++++++++++ test/sql/test_types.py | 1 + 3 files changed, 46 insertions(+) diff --git a/lib/sqlalchemy/testing/requirements.py b/lib/sqlalchemy/testing/requirements.py index 706d6d0607..1f69869427 100644 --- a/lib/sqlalchemy/testing/requirements.py +++ b/lib/sqlalchemy/testing/requirements.py @@ -373,6 +373,30 @@ class SuiteRequirements(Requirements): return exclusions.open() + @property + def binary_comparisons(self): + """target database/driver can allow BLOB/BINARY fields to be compared + against a bound parameter value. + """ + + return exclusions.open() + + @property + def binary_literals(self): + """target backend supports simple binary literals, e.g. an + expression like:: + + SELECT CAST('foo' AS BINARY) + + Where ``BINARY`` is the type emitted from :class:`.LargeBinary`, + e.g. it could be ``BLOB`` or similar. + + Basically fails on Oracle. + + """ + + return exclusions.open() + @property def precision_numerics_general(self): """target backend has general support for moderately high-precision diff --git a/test/requirements.py b/test/requirements.py index 29b7d9997b..c75a110c6a 100644 --- a/test/requirements.py +++ b/test/requirements.py @@ -143,6 +143,26 @@ class DefaultRequirements(SuiteRequirements): "not supported by database/driver" ) + @property + def binary_literals(self): + """target backend supports simple binary literals, e.g. an + expression like:: + + SELECT CAST('foo' AS BINARY) + + Where ``BINARY`` is the type emitted from :class:`.LargeBinary`, + e.g. it could be ``BLOB`` or similar. + + Basically fails on Oracle. + + """ + # adding mssql here since it doesn't support comparisons either, + # have observed generally bad behavior with binary / mssql. + + return skip_if(["oracle", "mssql"], + "not supported by database/driver" + ) + @property def independent_cursors(self): """Target must support simultaneous, independent database cursors @@ -499,6 +519,7 @@ class DefaultRequirements(SuiteRequirements): return skip_if(['mssql', 'mysql', 'firebird', '+zxjdbc', 'oracle', 'sybase']) + @property def precision_numerics_general(self): """target backend has general support for moderately high-precision diff --git a/test/sql/test_types.py b/test/sql/test_types.py index fd927b51ac..3950b1a6ac 100644 --- a/test/sql/test_types.py +++ b/test/sql/test_types.py @@ -1203,6 +1203,7 @@ class BinaryTest(fixtures.TestBase, AssertsExecutionResults): count().scalar(), 1) + @testing.requires.binary_literals def test_literal_roundtrip(self): compiled = select([cast(literal(util.b("foo")), LargeBinary)]).compile( dialect=testing.db.dialect, -- 2.47.3