summaryrefslogtreecommitdiff
path: root/tests/test_postgresql.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-12-03 13:29:05 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2011-12-03 13:29:05 -0500
commit1025488f3684415002f331fa2e557be7cdb447bb (patch)
tree3cfb0cfecd11c1b848ad7b2c196f3e78d990676f /tests/test_postgresql.py
parent3bf28d1fc3e665ae81baa5e47609840ea6f42142 (diff)
downloadalembic-1025488f3684415002f331fa2e557be7cdb447bb.tar.gz
- Clean up file write operations so that
file handles are closed. - PyPy is supported.
Diffstat (limited to 'tests/test_postgresql.py')
-rw-r--r--tests/test_postgresql.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/test_postgresql.py b/tests/test_postgresql.py
index 325cbb6..157b2e8 100644
--- a/tests/test_postgresql.py
+++ b/tests/test_postgresql.py
@@ -1,6 +1,6 @@
from tests import op_fixture, db_for_dialect, eq_, staging_env, \
- clear_staging_env, no_sql_testing_config,\
+ clear_staging_env, _no_sql_testing_config,\
capture_context_buffer, requires_07
from unittest import TestCase
from sqlalchemy import DateTime, MetaData, Table, Column, text, Integer, String
@@ -12,13 +12,17 @@ class PGOfflineEnumTest(TestCase):
@requires_07
def setUp(self):
env = staging_env()
- self.cfg = cfg = no_sql_testing_config()
+ self.cfg = cfg = _no_sql_testing_config()
self.rid = rid = util.rev_id()
self.script = script = ScriptDirectory.from_config(cfg)
script.generate_rev(rid, None, refresh=True)
+ def tearDown(self):
+ clear_staging_env()
+
+
def _inline_enum_script(self):
self.script.write(self.rid, """
down_revision = None
@@ -57,9 +61,6 @@ def downgrade():
""")
- def tearDown(self):
- clear_staging_env()
-
def test_offline_inline_enum_create(self):
self._inline_enum_script()
with capture_context_buffer() as buf: