summaryrefslogtreecommitdiff
path: root/test/requirements.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/requirements.py')
-rw-r--r--test/requirements.py45
1 files changed, 44 insertions, 1 deletions
diff --git a/test/requirements.py b/test/requirements.py
index 05ca8d717..4d5869226 100644
--- a/test/requirements.py
+++ b/test/requirements.py
@@ -30,7 +30,7 @@ def exclude(db, op, spec, description=None):
class DefaultRequirements(SuiteRequirements):
@property
def deferrable_or_no_constraints(self):
- """Target database must support derferable constraints."""
+ """Target database must support deferrable constraints."""
return skip_if([
no_support('firebird', 'not supported by database'),
@@ -39,6 +39,12 @@ class DefaultRequirements(SuiteRequirements):
])
@property
+ def check_constraints(self):
+ """Target database must support check constraints."""
+
+ return exclusions.open()
+
+ @property
def named_constraints(self):
"""target database must support names for constraints."""
@@ -121,6 +127,17 @@ class DefaultRequirements(SuiteRequirements):
)
@property
+ def temporary_tables(self):
+ """target database supports temporary tables"""
+ return skip_if(
+ ["mssql"], "sql server has some other syntax?"
+ )
+
+ @property
+ def temp_table_reflection(self):
+ return self.temporary_tables
+
+ @property
def reflectable_autoincrement(self):
"""Target database must support tables that can automatically generate
PKs assuming they were reflected.
@@ -443,6 +460,7 @@ class DefaultRequirements(SuiteRequirements):
)
+
@property
def emulated_lastrowid(self):
""""target dialect retrieves cursor.lastrowid or an equivalent
@@ -638,6 +656,10 @@ class DefaultRequirements(SuiteRequirements):
'postgresql+pg8000', None, None,
'postgresql+pg8000 has FP inaccuracy even with '
'only four decimal places '),
+ (
+ 'postgresql+psycopg2cffi', None, None,
+ 'postgresql+psycopg2cffi has FP inaccuracy even with '
+ 'only four decimal places '),
])
@property
@@ -738,6 +760,10 @@ class DefaultRequirements(SuiteRequirements):
"+psycopg2", None, None,
"psycopg2 2.4 no longer accepts percent "
"sign in bind placeholders"),
+ (
+ "+psycopg2cffi", None, None,
+ "psycopg2cffi does not accept percent signs in "
+ "bind placeholders"),
("mysql", None, None, "executemany() doesn't work here")
]
)
@@ -760,6 +786,17 @@ class DefaultRequirements(SuiteRequirements):
"Not supported on MySQL + Windows"
)
+ @property
+ def mssql_freetds(self):
+ return only_on(
+ LambdaPredicate(
+ lambda config: (
+ (against(config, 'mssql+pyodbc') and
+ config.db.dialect.freetds)
+ or against(config, 'mssql+pymssql')
+ )
+ )
+ )
@property
def selectone(self):
@@ -779,3 +816,9 @@ class DefaultRequirements(SuiteRequirements):
return against(config, 'mysql') and \
config.db.dialect._detect_casing(config.db) == 0
+ @property
+ def postgresql_utf8_server_encoding(self):
+ return only_if(
+ lambda config: against(config, 'postgresql') and
+ config.db.scalar("show server_encoding").lower() == "utf8"
+ )