summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-08-30 00:11:32 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2014-08-30 00:11:32 -0400
commit51c7005dc5cc04a9ed24fbfa290e50df6fb70369 (patch)
treec24d94cf58b9f23e72d8e0685bd87f0b4ed7c869 /lib
parent04f0e11051f0f00cbb64dd37dfa287e6173463ba (diff)
downloadsqlalchemy-51c7005dc5cc04a9ed24fbfa290e50df6fb70369.tar.gz
- clean up zoomark a little and try to get new profiles written
Diffstat (limited to 'lib')
-rw-r--r--lib/sqlalchemy/testing/replay_fixture.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/sqlalchemy/testing/replay_fixture.py b/lib/sqlalchemy/testing/replay_fixture.py
index b8a0f6df1..b50f52e3d 100644
--- a/lib/sqlalchemy/testing/replay_fixture.py
+++ b/lib/sqlalchemy/testing/replay_fixture.py
@@ -29,9 +29,11 @@ class ReplayFixtureTest(fixtures.TestBase):
self.session = Session(engine)
self.setup_engine()
- self._run_steps(ctx=self._dummy_ctx)
- self.teardown_engine()
- engine.dispose()
+ try:
+ self._run_steps(ctx=self._dummy_ctx)
+ finally:
+ self.teardown_engine()
+ engine.dispose()
player = lambda: dbapi_session.player()
engine = create_engine(
@@ -43,8 +45,11 @@ class ReplayFixtureTest(fixtures.TestBase):
self.session = Session(engine)
self.setup_engine()
- self._run_steps(ctx=profiling.count_functions)
- self.teardown_engine()
+ try:
+ self._run_steps(ctx=profiling.count_functions)
+ finally:
+ self.session.close()
+ engine.dispose()
def setup_engine(self):
pass