本文整理汇总了Python中sqlalchemy.testing.exclusions.skip_if函数的典型用法代码示例。如果您正苦于以下问题:Python skip_if函数的具体用法?Python skip_if怎么用?Python skip_if使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了skip_if函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: time_microseconds
def time_microseconds(self):
"""target dialect supports representation of Python
datetime.time() with microsecond objects."""
return skip_if(
["mssql", "mysql", "firebird", "+zxjdbc", "oracle", "sybase"]
)
开发者ID:BY-jk,项目名称:sqlalchemy,代码行数:7,代码来源:requirements.py
示例2: schemas
def schemas(self):
"""Target database must support external schemas, and have one
named 'test_schema'."""
return skip_if([
"firebird"
], "no schema support")
开发者ID:robin900,项目名称:sqlalchemy,代码行数:7,代码来源:requirements.py
示例3: two_phase_transactions
def two_phase_transactions(self):
"""Target database must support two-phase transactions."""
return skip_if(
[
no_support("firebird", "no SA implementation"),
no_support("mssql", "two-phase xact not supported by drivers"),
no_support(
"oracle", "two-phase xact not implemented in SQLA/oracle"
),
no_support(
"drizzle", "two-phase xact not supported by database"
),
no_support(
"sqlite", "two-phase xact not supported by database"
),
no_support(
"sybase", "two-phase xact not supported by drivers/SQLA"
),
no_support(
"postgresql+zxjdbc",
"FIXME: JDBC driver confuses the transaction state, "
"may need separate XA implementation",
),
no_support(
"mysql",
"recent MySQL communiity editions have too many issues "
"(late 2016), disabling for now",
),
]
)
开发者ID:BY-jk,项目名称:sqlalchemy,代码行数:31,代码来源:requirements.py
示例4: non_updating_cascade
def non_updating_cascade(self):
"""target database must *not* support ON UPDATE..CASCADE behavior in
foreign keys."""
return fails_on_everything_except(
"sqlite", "oracle", "+zxjdbc"
) + skip_if("mssql")
开发者ID:BY-jk,项目名称:sqlalchemy,代码行数:7,代码来源:requirements.py
示例5: unbounded_varchar
def unbounded_varchar(self):
"""Target database must support VARCHAR with no length"""
return skip_if([
"firebird", "oracle", "mysql"
], "not supported by database"
)
开发者ID:NeilTruick,项目名称:sqlalchemy,代码行数:7,代码来源:requirements.py
示例6: two_phase_recovery
def two_phase_recovery(self):
return self.two_phase_transactions + (
skip_if(
"mysql",
"crashes on most mariadb and mysql versions"
)
)
开发者ID:robin900,项目名称:sqlalchemy,代码行数:7,代码来源:requirements.py
示例7: savepoints
def savepoints(self):
"""Target database must support savepoints."""
return skip_if(
["sqlite", "sybase", ("mysql", "<", (5, 0, 3))],
"savepoints not supported",
)
开发者ID:BY-jk,项目名称:sqlalchemy,代码行数:7,代码来源:requirements.py
示例8: postgresql_test_dblink
def postgresql_test_dblink(self):
return skip_if(
lambda config: not config.file_config.has_option(
"sqla_testing", "postgres_test_db_link"
),
"postgres_test_db_link option not specified in config",
)
开发者ID:BY-jk,项目名称:sqlalchemy,代码行数:7,代码来源:requirements.py
示例9: binary_comparisons
def binary_comparisons(self):
"""target database/driver can allow BLOB/BINARY fields to be compared
against a bound parameter value.
"""
return skip_if(["oracle", "mssql"],
"not supported by database/driver"
)
开发者ID:NeilTruick,项目名称:sqlalchemy,代码行数:7,代码来源:requirements.py
示例10: standalone_binds
def standalone_binds(self):
"""target database/driver supports bound parameters as column expressions
without being in the context of a typed column.
"""
return skip_if(["firebird", "mssql+mxodbc"],
"not supported by driver")
开发者ID:NeilTruick,项目名称:sqlalchemy,代码行数:7,代码来源:requirements.py
示例11: on_update_cascade
def on_update_cascade(self):
"""target database must support ON UPDATE..CASCADE behavior in
foreign keys."""
return skip_if(
["sqlite", "oracle"],
"target backend %(doesnt_support)s ON UPDATE CASCADE",
)
开发者ID:BY-jk,项目名称:sqlalchemy,代码行数:8,代码来源:requirements.py
示例12: boolean_col_expressions
def boolean_col_expressions(self):
"""Target database must support boolean expressions as columns"""
return skip_if([
no_support('firebird', 'not supported by database'),
no_support('oracle', 'not supported by database'),
no_support('mssql', 'not supported by database'),
no_support('sybase', 'not supported by database'),
])
开发者ID:NeilTruick,项目名称:sqlalchemy,代码行数:8,代码来源:requirements.py
示例13: precision_numerics_enotation_large
def precision_numerics_enotation_large(self):
"""target backend supports Decimal() objects using E notation
to represent very large values."""
return skip_if(
[("sybase+pyodbc", None, None,
"Don't know how do get these values through FreeTDS + Sybase"),
("firebird", None, None, "Precision must be from 1 to 18")])
开发者ID:rlugojr,项目名称:sqlalchemy,代码行数:8,代码来源:requirements.py
示例14: deferrable_or_no_constraints
def deferrable_or_no_constraints(self):
"""Target database must support derferable constraints."""
return skip_if([
no_support('firebird', 'not supported by database'),
no_support('mysql', 'not supported by database'),
no_support('mssql', 'not supported by database'),
])
开发者ID:NeilTruick,项目名称:sqlalchemy,代码行数:8,代码来源:requirements.py
示例15: on_update_cascade
def on_update_cascade(self):
"""target database must support ON UPDATE..CASCADE behavior in
foreign keys."""
return skip_if(
['sqlite', 'oracle'],
'target backend does not support ON UPDATE CASCADE'
)
开发者ID:NeilTruick,项目名称:sqlalchemy,代码行数:8,代码来源:requirements.py
示例16: dbapi_lastrowid
def dbapi_lastrowid(self):
""""target backend includes a 'lastrowid' accessor on the DBAPI
cursor object.
"""
return skip_if('mssql+pymssql', 'crashes on pymssql') + \
fails_on_everything_except('mysql',
'sqlite+pysqlite', 'sqlite+pysqlcipher')
开发者ID:FlipperPA,项目名称:sqlalchemy,代码行数:8,代码来源:requirements.py
示例17: percent_schema_names
def percent_schema_names(self):
return skip_if(
[
("+psycopg2", None, None,
"psycopg2 2.4 no longer accepts % in bind placeholders"),
("mysql", None, None, "executemany() doesn't work here")
]
)
开发者ID:GitHublong,项目名称:sqlalchemy,代码行数:8,代码来源:requirements.py
示例18: unicode_connections
def unicode_connections(self):
"""
Target driver must support some encoding of Unicode across the wire.
"""
# TODO: expand to exclude MySQLdb versions w/ broken unicode
return skip_if([
exclude('mysql', '<', (4, 1, 1), 'no unicode connection support'),
])
开发者ID:cpcloud,项目名称:sqlalchemy,代码行数:8,代码来源:requirements.py
示例19: correlated_outer_joins
def correlated_outer_joins(self):
"""Target must support an outer join to a subquery which
correlates to the parent."""
return skip_if(
"oracle",
'Raises "ORA-01799: a column may not be '
'outer-joined to a subquery"',
)
开发者ID:BY-jk,项目名称:sqlalchemy,代码行数:9,代码来源:requirements.py
示例20: unicode_ddl
def unicode_ddl(self):
"""Target driver must support some degree of non-ascii symbol names."""
# TODO: expand to exclude MySQLdb versions w/ broken unicode
return skip_if([
no_support('oracle', 'FIXME: no support in database?'),
no_support('sybase', 'FIXME: guessing, needs confirmation'),
no_support('mssql+pymssql', 'no FreeTDS support'),
exclude('mysql', '<', (4, 1, 1), 'no unicode connection support'),
])
开发者ID:NeilTruick,项目名称:sqlalchemy,代码行数:9,代码来源:requirements.py
注:本文中的sqlalchemy.testing.exclusions.skip_if函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论