diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-01-23 18:02:17 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-01-24 16:38:36 -0500 |
| commit | d446d8df1b2456c3444a4e0ebc0cb76ef03afac5 (patch) | |
| tree | 8f0b7ffe733d33fa3a76d085fd4544816477cdb2 /test/sql | |
| parent | 33b12754f9aa0aaee2bdac01faeade7ecc93f028 (diff) | |
| download | sqlalchemy-d446d8df1b2456c3444a4e0ebc0cb76ef03afac5.tar.gz | |
Remove errant assertion from unit of work
Fixed ORM unit of work regression where an errant "assert primary_key"
statement interferes with primary key generation sequences that don't
actually consider the columns in the table to use a real primary key
constraint, instead using :paramref:`_orm.mapper.primary_key` to establish
certain columns as "primary".
Also remove errant "identity" requirement which does not seem to
represent any current backend and is applied to
test/sql/test_defaults.py->AutoIncrementTest, but these tests work
on all backends.
Fixes: #5867
Change-Id: I4502ca5079d824d7b4d055194947aa1a00effde7
Diffstat (limited to 'test/sql')
| -rw-r--r-- | test/sql/test_defaults.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/sql/test_defaults.py b/test/sql/test_defaults.py index 7f8391708..543ae1f98 100644 --- a/test/sql/test_defaults.py +++ b/test/sql/test_defaults.py @@ -1082,11 +1082,11 @@ class EmptyInsertTest(fixtures.TestBase): class AutoIncrementTest(fixtures.TestBase): - __requires__ = ("identity",) + __backend__ = True - @testing.provide_metadata - def test_autoincrement_single_col(self, connection): + @testing.requires.empty_inserts + def test_autoincrement_single_col(self, metadata, connection): single = Table( "single", self.metadata, Column("id", Integer, primary_key=True) ) |
