diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-10-18 21:17:00 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2017-10-18 21:17:00 -0400 |
| commit | 1210f49bb5a691324a55b4c3bf4600c359f396a9 (patch) | |
| tree | b8615a32522d9c65717c3b835572eeccbb1b3fb8 /lib/sqlalchemy/testing/suite | |
| parent | 1fbed902ede72e5a663b7e685843f0a8ed250c45 (diff) | |
| download | sqlalchemy-1210f49bb5a691324a55b4c3bf4600c359f396a9.tar.gz | |
Don't commit failed transaction
The test here commits even though integrityerror
was raised due to the fixture. Postgresql seems to allow
this even though it's usually strict about this. remove
the requirement that a database needs to be able to
commit after an integrity error was raised.
Change-Id: I437faadb04ff7a9c3f624c68646b4f4f504b504a
Diffstat (limited to 'lib/sqlalchemy/testing/suite')
| -rw-r--r-- | lib/sqlalchemy/testing/suite/test_dialect.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/sqlalchemy/testing/suite/test_dialect.py b/lib/sqlalchemy/testing/suite/test_dialect.py index 5dd1f0501..2c5dd0e36 100644 --- a/lib/sqlalchemy/testing/suite/test_dialect.py +++ b/lib/sqlalchemy/testing/suite/test_dialect.py @@ -29,7 +29,9 @@ class ExceptionTest(fixtures.TablesTest): @requirements.duplicate_key_raises_integrity_error def test_integrity_error(self): - with config.db.begin() as conn: + with config.db.connect() as conn: + + trans = conn.begin() conn.execute( self.tables.manual_pk.insert(), {'id': 1, 'data': 'd1'} @@ -42,6 +44,8 @@ class ExceptionTest(fixtures.TablesTest): {'id': 1, 'data': 'd1'} ) + trans.rollback() + class AutocommitTest(fixtures.TablesTest): |
