Here are the examples of the python api sqlalchemy.testing.exclusions.fails_if taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
30 Examples
3
View Complete Implementation : requirements.py
Copyright MIT License
Author : operator
Copyright MIT License
Author : operator
@property
def update_where_target_in_subquery(self):
"""Target must support UPDATE where the same table is present in a
subquery in the WHERE clause.
This is an ANSI-standard syntax that apparently MySQL can't handle,
such as:
UPDATE docameents SET flag=1 WHERE docameents.satle IN
(SELECT max(docameents.satle) AS satle
FROM docameents GROUP BY docameents.user_id
)
"""
return fails_if('mysql',
'MySQL error 1093 "Cant specify target table '
'for update in FROM clause"')
3
View Complete Implementation : requirements.py
Copyright MIT License
Author : operator
Copyright MIT License
Author : operator
@property
def intersect(self):
"""Target database must support INTERSECT or equivalent."""
return fails_if([
"firebird", "mysql", "sybase",
], 'no support for INTERSECT')
3
View Complete Implementation : requirements.py
Copyright MIT License
Author : operator
Copyright MIT License
Author : operator
@property
def except_(self):
"""Target database must support EXCEPT or equivalent (i.e. MINUS)."""
return fails_if([
"firebird", "mysql", "sybase",
], 'no support for EXCEPT')
3
View Complete Implementation : requirements.py
Copyright MIT License
Author : operator
Copyright MIT License
Author : operator
@property
def parens_in_union_contained_select_w_limit_offset(self):
"""Target database must support parenthesized SELECT in UNION
when LIMIT/OFFSET is specifically present.
E.g. (SELECT ...) UNION (SELECT ..)
This is known to fail on SQLite.
"""
return fails_if('sqlite')
3
View Complete Implementation : requirements.py
Copyright MIT License
Author : operator
Copyright MIT License
Author : operator
@property
def parens_in_union_contained_select_wo_limit_offset(self):
"""Target database must support parenthesized SELECT in UNION
when OFFSET/LIMIT is specifically not present.
E.g. (SELECT ... LIMIT ..) UNION (SELECT .. OFFSET ..)
This is known to fail on SQLite. It also fails on Oracle
because without LIMIT/OFFSET, there is currently no step that
creates an additional subquery.
"""
return fails_if(['sqlite', 'oracle'])
3
View Complete Implementation : requirements.py
Copyright MIT License
Author : operator
Copyright MIT License
Author : operator
@property
def offset(self):
"""Target database must support some method of adding OFFSET or
equivalent to a result set."""
return fails_if([
"sybase"
], 'no support for OFFSET or equivalent')
3
View Complete Implementation : requirements.py
Copyright MIT License
Author : operator
Copyright MIT License
Author : operator
@property
def empty_strings_varchar(self):
"""
target database can persist/return an empty string with a varchar.
"""
return fails_if(["oracle"],
'oracle converts empty strings to a blank space')
3
View Complete Implementation : requirements.py
Copyright MIT License
Author : operator
Copyright MIT License
Author : operator
@property
def sane_multi_rowcount(self):
return fails_if(
lambda config: not config.db.dialect.supports_sane_multi_rowcount,
"driver %(driver)s %(doesnt_support)s 'sane' multi row count"
)
3
View Complete Implementation : requirements.py
Copyright MIT License
Author : operator
Copyright MIT License
Author : operator
@property
def precision_numerics_many_significant_digits(self):
"""target backend supports values with many digits on both sides,
such as 319438950232418390.273596, 87673.594069654243
"""
return fails_if(
[('sqlite', None, None, 'TODO'),
("firebird", None, None, "Precision must be from 1 to 18"),
("sybase+pysybase", None, None, "TODO"),
('mssql+pymssql', None, None,
'FIXME: improve pymssql dec handling')]
)
3
View Complete Implementation : requirements.py
Copyright MIT License
Author : operator
Copyright MIT License
Author : operator
@property
def precision_numerics_retains_significant_digits(self):
"""A precision numeric type will return empty significant digits,
i.e. a value such as 10.000 will come back in Decimal form with
the .000 maintained."""
return fails_if(
[
('oracle', None, None,
"this may be a bug due to the difficulty in handling "
"oracle precision numerics"),
("firebird", None, None,
"database and/or driver truncates decimal places.")
]
)