diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-03-28 16:32:11 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-03-28 16:32:11 -0400 |
| commit | c01558ae7f4af08acc523786e107ea5e2e214184 (patch) | |
| tree | a235ab825660b00c674f496354b364f58f8b464a /lib/sqlalchemy/testing | |
| parent | 9cdbed37f8c420db0b42fb959813d079622c3f3a (diff) | |
| download | sqlalchemy-c01558ae7f4af08acc523786e107ea5e2e214184.tar.gz | |
- Fixed ORM bug where changing the primary key of an object, then marking
it for DELETE would fail to target the correct row for DELETE.
Then to compound matters, basic "number of rows matched" checks were
not being performed. Both issues are fixed, however note that the
"rows matched" check requires so-called "sane multi-row count"
functionality; the DBAPI's executemany() method must count up the
rows matched by individual statements and SQLAlchemy's dialect must
mark this feature as supported, currently applies to some mysql dialects,
psycopg2, sqlite only. fixes #3006
- Enabled "sane multi-row count" checking for the psycopg2 DBAPI, as
this seems to be supported as of psycopg2 2.0.9.
Diffstat (limited to 'lib/sqlalchemy/testing')
| -rw-r--r-- | lib/sqlalchemy/testing/exclusions.py | 3 | ||||
| -rw-r--r-- | lib/sqlalchemy/testing/requirements.py | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/exclusions.py b/lib/sqlalchemy/testing/exclusions.py index 00bb69cbc..00ca28428 100644 --- a/lib/sqlalchemy/testing/exclusions.py +++ b/lib/sqlalchemy/testing/exclusions.py @@ -74,6 +74,9 @@ class skip_if(object): self._fails_on = skip_if(other, reason) return self + def fails_on_everything_except(self, *dbs): + self._fails_on = skip_if(fails_on_everything_except(*dbs)) + return self class fails_if(skip_if): def __call__(self, fn): diff --git a/lib/sqlalchemy/testing/requirements.py b/lib/sqlalchemy/testing/requirements.py index 76e48f8c8..07b5697e2 100644 --- a/lib/sqlalchemy/testing/requirements.py +++ b/lib/sqlalchemy/testing/requirements.py @@ -48,6 +48,12 @@ class SuiteRequirements(Requirements): return exclusions.open() @property + def non_updating_cascade(self): + """target database must *not* support ON UPDATE..CASCADE behavior in + foreign keys.""" + return exclusions.closed() + + @property def deferrable_fks(self): return exclusions.closed() |
