class TypeCoerceCastTest(fixtures.TablesTest):
+ __backend__ = True
+
@classmethod
def define_tables(cls, metadata):
class MyType(types.TypeDecorator):
Table("t", metadata, Column("data", String(50)))
- @testing.fails_on(
- "oracle", "oracle doesn't like CAST in the VALUES of an INSERT"
- )
- @testing.fails_on("mysql", "mysql dialect warns on skipped CAST")
def test_insert_round_trip_cast(self):
self._test_insert_round_trip(cast)
[("BIND_INd1BIND_OUT",)],
)
- @testing.fails_on(
- "oracle",
- "ORA-00906: missing left parenthesis - "
- "seems to be CAST(:param AS type)",
- )
- @testing.fails_on("mysql", "mysql dialect warns on skipped CAST")
def test_coerce_from_nulltype_cast(self):
self._test_coerce_from_nulltype(cast)
[("BIND_INTHISISMYOBJBIND_OUT",)],
)
- @testing.fails_on(
- "oracle", "oracle doesn't like CAST in the VALUES of an INSERT"
- )
- @testing.fails_on("mysql", "mysql dialect warns on skipped CAST")
def test_vs_non_coerced_cast(self):
self._test_vs_non_coerced(cast)
[("BIND_INd1", "BIND_INd1BIND_OUT")],
)
- @testing.fails_on(
- "oracle", "oracle doesn't like CAST in the VALUES of an INSERT"
- )
- @testing.fails_on("mysql", "mysql dialect warns on skipped CAST")
def test_vs_non_coerced_alias_cast(self):
self._test_vs_non_coerced_alias(cast)
[("BIND_INd1", "BIND_INd1BIND_OUT")],
)
- @testing.fails_on(
- "oracle", "oracle doesn't like CAST in the VALUES of an INSERT"
- )
- @testing.fails_on("mysql", "mysql dialect warns on skipped CAST")
def test_vs_non_coerced_where_cast(self):
self._test_vs_non_coerced_where(cast)
[("BIND_INd1", "BIND_INd1BIND_OUT")],
)
- @testing.fails_on(
- "oracle", "oracle doesn't like CAST in the VALUES of an INSERT"
- )
- @testing.fails_on("mysql", "mysql dialect warns on skipped CAST")
def test_coerce_none_cast(self):
self._test_coerce_none(cast)
[],
)
- @testing.fails_on(
- "oracle", "oracle doesn't like CAST in the VALUES of an INSERT"
- )
- @testing.fails_on("mysql", "mysql dialect warns on skipped CAST")
def test_resolve_clause_element_cast(self):
self._test_resolve_clause_element(cast)
else [("x", "xBIND_OUT")],
)
- @testing.fails_on(
- "oracle",
- "ORA-00906: missing left parenthesis - "
- "seems to be CAST(:param AS type)",
- )
- @testing.fails_on("mysql", "mysql dialect warns on skipped CAST")
def test_cast_existing_typed(self):
MyType = self.MyType
coerce_fn = cast
[("footwo",), ("footwo",), ("fooone",)],
)
- @testing.fails_on(
- "postgresql+zxjdbc",
- 'zxjdbc fails on ENUM: column "XXX" is of type XXX '
- "but expression is of type character varying",
- )
def test_round_trip(self):
enum_table = self.tables["enum_table"]
"""
+ __backend__ = True
+
def _fixture(self, metadata, type_, data):
t = Table("t", metadata, Column("val", type_))
metadata.create_all()
class IntervalTest(fixtures.TestBase, AssertsExecutionResults):
+
+ __backend__ = True
+
@classmethod
def setup_class(cls):
global interval_table, metadata
def teardown_class(cls):
metadata.drop_all()
+ @testing.fails_on("oracle", "See issue #4971")
def test_non_native_adapt(self):
interval = Interval(native=False)
adapted = interval.dialect_impl(testing.db.dialect)
assert adapted.native is False
eq_(str(adapted), "DATETIME")
+ @testing.fails_on(
+ "oracle",
+ "ORA-01873: the leading precision of the interval is too small",
+ )
def test_roundtrip(self):
small_delta = datetime.timedelta(days=15, seconds=5874)
delta = datetime.timedelta(414)
eq_(row["native_interval_args"], delta)
eq_(row["non_native_interval"], delta)
+ @testing.fails_on(
+ "oracle", "ORA-00932: inconsistent datatypes: expected NUMBER got DATE"
+ )
def test_null(self):
interval_table.insert().execute(
id=1, native_inverval=None, non_native_interval=None
"""
+ __backend__ = True
+
@classmethod
def define_tables(cls, metadata):
Table(