summaryrefslogtreecommitdiff
path: root/tests/test_postgresql.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-11-09 12:33:26 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2014-11-09 12:33:26 -0500
commit9abd572c70c09114313dc7349783378f54690c98 (patch)
treed051a9f65cb255411b53d3cdf788c57050933f96 /tests/test_postgresql.py
parent8b8fe7b3c31ca58d33529fc27a269b14e2d010f9 (diff)
downloadalembic-9abd572c70c09114313dc7349783378f54690c98.tar.gz
- add some connection cleanup
Diffstat (limited to 'tests/test_postgresql.py')
-rw-r--r--tests/test_postgresql.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_postgresql.py b/tests/test_postgresql.py
index f1b2c2d..908eec6 100644
--- a/tests/test_postgresql.py
+++ b/tests/test_postgresql.py
@@ -319,9 +319,10 @@ class PostgresqlDetectSerialTest(TestBase):
@classmethod
def setup_class(cls):
cls.bind = config.db
+ cls.conn = cls.bind.connect()
staging_env()
context = MigrationContext.configure(
- connection=cls.bind.connect(),
+ connection=cls.conn,
opts={
'compare_type': True,
'compare_server_default': True
@@ -343,6 +344,7 @@ class PostgresqlDetectSerialTest(TestBase):
@classmethod
def teardown_class(cls):
+ cls.conn.close()
clear_staging_env()
@provide_metadata