]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
ensure cursors are closed
authorPhilip Jenvey <pjenvey@underboss.org>
Thu, 16 Jul 2009 22:56:19 +0000 (22:56 +0000)
committerPhilip Jenvey <pjenvey@underboss.org>
Thu, 16 Jul 2009 22:56:19 +0000 (22:56 +0000)
test/engine/test_bind.py
test/sql/test_unicode.py

index df1a644350a2eef5d5cce0c0a775a250546a4980..1122f1632fbdb4cb4f8a4724b29a38f10c3dff8b 100644 (file)
@@ -199,7 +199,7 @@ class BindTest(testing.TestBase):
                     try:
                         e = elem(bind=bind)
                         assert e.bind is bind
-                        e.execute()
+                        e.execute().close()
                     finally:
                         if isinstance(bind, engine.Connection):
                             bind.close()
index fe9b88e3bae9b605b1345976cdceb7a7be53e34d..6551594f32034524bf72367974dd7a3b7746a961 100644 (file)
@@ -126,7 +126,7 @@ class EscapesDefaultsTest(testing.TestBase):
             # reset the identifier preparer, so that we can force it to cache
             # a unicode identifier
             engine.dialect.identifier_preparer = engine.dialect.preparer(engine.dialect)
-            select([column(u'special_col')]).select_from(t1).execute()
+            select([column(u'special_col')]).select_from(t1).execute().close()
             assert isinstance(engine.dialect.identifier_preparer.format_sequence(Sequence('special_col')), unicode)
             
             # now execute, run the sequence.  it should run in u"Special_col.nextid" or similar as