diff options
| author | mike bayer <mike_mp@zzzcomputing.com> | 2017-10-20 11:40:18 -0400 |
|---|---|---|
| committer | Gerrit Code Review <gerrit@ci.zzzcomputing.com> | 2017-10-20 11:40:18 -0400 |
| commit | 62b3e73b2533838814009dd08e5c7b693e828747 (patch) | |
| tree | 254d209ab2251c8b714be4c76dca03a4078555a1 | |
| parent | 1de16235906e67fe112bcb31965b8f426ebccc6a (diff) | |
| parent | 1210f49bb5a691324a55b4c3bf4600c359f396a9 (diff) | |
| download | sqlalchemy-62b3e73b2533838814009dd08e5c7b693e828747.tar.gz | |
Merge "Don't commit failed transaction"
| -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): |
