]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
add a skip for oracle on this
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 1 Feb 2014 18:22:43 +0000 (13:22 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 1 Feb 2014 18:22:43 +0000 (13:22 -0500)
lib/sqlalchemy/testing/requirements.py
test/requirements.py
test/sql/test_types.py

index 706d6d060702c2be42bbf442c2f767d665b3f7fd..1f69869427573458778583fba695a3733263afbc 100644 (file)
@@ -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
index 29b7d9997b4dbec0ebc56a9c1b398472dfcb039c..c75a110c6ab1c77fd211d07306e70a98eacb44b1 100644 (file)
@@ -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
index fd927b51ac35e20412bbee01cf838914264ca5ad..3950b1a6ac55da5e97546dc0323988ee132d1588 100644 (file)
@@ -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,