diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-04-15 19:05:41 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-04-15 19:05:41 -0400 |
commit | 82d194c9a65b09fef8d52318cbe38e2c84dfd2ca (patch) | |
tree | 626464a0f56c7220923299abbf052538f61cc9fb /lib/sqlalchemy/test/requires.py | |
parent | 7cfd33d4ef9c00bcc2114469960590bdf22f8ac2 (diff) | |
download | sqlalchemy-82d194c9a65b09fef8d52318cbe38e2c84dfd2ca.tar.gz |
- Added get_pk_constraint() to reflection.Inspector, similar
to get_primary_keys() except returns a dict that includes the
name of the constraint, for supported backends (PG so far).
[ticket:1769]
- Postgresql reflects the name of primary key constraints,
if one exists. [ticket:1769]
Diffstat (limited to 'lib/sqlalchemy/test/requires.py')
-rw-r--r-- | lib/sqlalchemy/test/requires.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/sqlalchemy/test/requires.py b/lib/sqlalchemy/test/requires.py index bf911c2c2..1b9052fd8 100644 --- a/lib/sqlalchemy/test/requires.py +++ b/lib/sqlalchemy/test/requires.py @@ -11,7 +11,8 @@ from testing import \ exclude, \ emits_warning_on,\ skip_if,\ - fails_on + fails_on,\ + fails_on_everything_except import testing import sys @@ -245,6 +246,13 @@ def sane_rowcount(fn): fn, skip_if(lambda: not testing.db.dialect.supports_sane_rowcount) ) + +def reflects_pk_names(fn): + """Target driver reflects the name of primary key constraints.""" + return _chain_decorators_on( + fn, + fails_on_everything_except('postgresql') + ) def python2(fn): return _chain_decorators_on( |