]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Fixed assert_sql_count exception logic.
authorJason Kirtland <jek@discorporate.us>
Tue, 23 Oct 2007 07:03:07 +0000 (07:03 +0000)
committerJason Kirtland <jek@discorporate.us>
Tue, 23 Oct 2007 07:03:07 +0000 (07:03 +0000)
test/testlib/testing.py

index 74a2cb5cdb0153474fc5153b2d4d27b3e1de603a..3a2c38ce6156ece83575d359d4e2dbd1ce2f9ac6 100644 (file)
@@ -306,12 +306,10 @@ class AssertMixin(PersistTest):
     def assert_sql_count(self, db, callable_, count):
         global testdata
         testdata = TestData()
-        try:
-            callable_()
-        finally:
-            self.assert_(testdata.sql_count == count,
-                         "desired statement count %d does not match %d" % (
-                         count, testdata.sql_count))
+        callable_()
+        self.assert_(testdata.sql_count == count,
+                     "desired statement count %d does not match %d" % (
+                       count, testdata.sql_count))
 
     def capture_sql(self, db, callable_):
         global testdata