From: Jason Kirtland Date: Thu, 27 Sep 2007 23:23:27 +0000 (+0000) Subject: - Explicitly close connections in the FOR UPDATE tests. X-Git-Tag: rel_0_4_0~92 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=30f0f0cf5dee8b76b2a7e450f1d3adf1b834219b;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - Explicitly close connections in the FOR UPDATE tests. - Minor housekeeping. --- diff --git a/test/engine/transaction.py b/test/engine/transaction.py index cf0be06596..6a26bf597d 100644 --- a/test/engine/transaction.py +++ b/test/engine/transaction.py @@ -247,7 +247,7 @@ class TransactionTest(PersistTest): @testing.supported('postgres', 'mysql') @testing.exclude('mysql', '<', (5, 0, 3)) - def testmixedtransaction(self): + def testmixedtwophasetransaction(self): connection = testbase.db.connect() transaction = connection.begin_twophase() @@ -605,7 +605,6 @@ class ForUpdateTest(PersistTest): trans.rollback() errors.append(e) break - con.close() @testing.supported('mysql', 'oracle', 'postgres') @@ -652,6 +651,7 @@ class ForUpdateTest(PersistTest): except Exception, e: trans.rollback() errors.append(e) + con.close() def _threaded_overlap(self, thread_count, groups, update_style=True, pool=5): db = testbase.db @@ -686,5 +686,6 @@ class ForUpdateTest(PersistTest): update_style='nowait') self.assert_(len(errors) != 0) + if __name__ == "__main__": testbase.main()