summaryrefslogtreecommitdiff
path: root/test/testlib
diff options
context:
space:
mode:
authorJason Kirtland <jek@discorporate.us>2008-05-19 23:15:41 +0000
committerJason Kirtland <jek@discorporate.us>2008-05-19 23:15:41 +0000
commit8e9fce417a04e647c6c3a3791b59a9cb704fc44d (patch)
treea22c2a6137cab8f3710f8005c752fea516fb003b /test/testlib
parent856e8b1caef6b7276d5c12b022b052751c3a49de (diff)
downloadsqlalchemy-8e9fce417a04e647c6c3a3791b59a9cb704fc44d.tar.gz
Split out a couple true autoincrement/identity tests from emulated-with-sequences autoincrement=True tests.
Diffstat (limited to 'test/testlib')
-rw-r--r--test/testlib/requires.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/testlib/requires.py b/test/testlib/requires.py
index f5746da8f..7b2d33beb 100644
--- a/test/testlib/requires.py
+++ b/test/testlib/requires.py
@@ -27,6 +27,22 @@ def foreign_keys(fn):
no_support('sqlite', 'not supported by database'),
)
+def identity(fn):
+ """Target database must support GENERATED AS IDENTITY or a facsimile.
+
+ Includes GENERATED AS IDENTITY, AUTOINCREMENT, AUTO_INCREMENT, or other
+ column DDL feature that fills in a DB-generated identifier at INSERT-time
+ without requiring pre-execution of a SEQUENCE or other artifact.
+
+ """
+ return _chain_decorators_on(
+ fn,
+ no_support('firebird', 'not supported by database'),
+ no_support('oracle', 'not supported by database'),
+ no_support('postgres', 'not supported by database'),
+ no_support('sybase', 'not supported by database'),
+ )
+
def independent_connections(fn):
"""Target must support simultaneous, independent database connections."""