blob: afacd00be26fdcb2a63969b30740ed9d36a3aeb5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
from alembic.testing.requirements import SuiteRequirements
from alembic.testing import exclusions
class DefaultRequirements(SuiteRequirements):
@property
def schemas(self):
"""Target database must support external schemas, and have one
named 'test_schema'."""
return exclusions.skip_if([
"sqlite",
"firebird"
], "no schema support")
@property
def no_referential_integrity(self):
"""test will fail if referential integrity is enforced"""
return exclusions.fails_on_everything_except("sqlite")
@property
def non_native_boolean(self):
"""test will fail if native boolean is provided"""
return exclusions.fails_if(
exclusions.LambdaPredicate(
lambda config: config.db.dialect.supports_native_boolean
)
)
@property
def no_fk_names(self):
"""foreign key constraints have no names in the DB"""
return exclusions.only_on(['sqlite'])
@property
def fk_names(self):
"""foreign key constraints always have names in the DB"""
return exclusions.fails_on('sqlite')
|