diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-12-08 13:46:29 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2010-12-08 13:46:29 -0500 |
| commit | 8df4dc438583cb3a6b7bb67ce86d8264d4ee4282 (patch) | |
| tree | c4e2fb79370be1244e7d48986bbe9934127eee23 /test/engine/test_transaction.py | |
| parent | 1c67cf5cafa5a1ba4de4f9ee8f0a39521af81f30 (diff) | |
| download | sqlalchemy-8df4dc438583cb3a6b7bb67ce86d8264d4ee4282.tar.gz | |
- Threadlocal engine methods rollback(), commit(),
prepare() won't raise if no transaction is in progress;
this was a regression introduced in 0.6. [ticket:1998]
Diffstat (limited to 'test/engine/test_transaction.py')
| -rw-r--r-- | test/engine/test_transaction.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/engine/test_transaction.py b/test/engine/test_transaction.py index 14d8bfd1b..1e8c33a98 100644 --- a/test/engine/test_transaction.py +++ b/test/engine/test_transaction.py @@ -541,7 +541,19 @@ class TLTransactionTest(TestBase): # ensure tests start with engine closed tlengine.close() + + def test_rollback_no_trans(self): + # shouldn't fail + tlengine.rollback() + + def test_commit_no_trans(self): + # shouldn't fail + tlengine.commit() + def test_prepare_no_trans(self): + # shouldn't fail + tlengine.prepare() + def test_connection_close(self): """test that when connections are closed for real, transactions are rolled back and disposed.""" |
