summaryrefslogtreecommitdiff
path: root/test/dialect/test_postgresql.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-11-30 13:55:17 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2010-11-30 13:55:17 -0500
commit582b12152eb80bad865326dcda2f0a4fc51042d6 (patch)
treea64a20d12d50fa545898673d1ea062b1947ee286 /test/dialect/test_postgresql.py
parent4c6e93d72a47aa60fd0e7e82603b193eb64f9af4 (diff)
downloadsqlalchemy-582b12152eb80bad865326dcda2f0a4fc51042d6.tar.gz
- Fixed bug whereby KeyError would occur with non-ENUM
supported PG versions after a pool dispose+recreate would occur, [ticket:1989]
Diffstat (limited to 'test/dialect/test_postgresql.py')
-rw-r--r--test/dialect/test_postgresql.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/dialect/test_postgresql.py b/test/dialect/test_postgresql.py
index 92c089480..9a93ec7dc 100644
--- a/test/dialect/test_postgresql.py
+++ b/test/dialect/test_postgresql.py
@@ -411,6 +411,24 @@ class EnumTest(TestBase, AssertsExecutionResults, AssertsCompiledSQL):
metadata.drop_all()
assert not testing.db.dialect.has_type(testing.db,
'fourfivesixtype')
+
+ def test_no_support(self):
+ def server_version_info(self):
+ return (8, 2)
+
+ e = engines.testing_engine()
+ dialect = e.dialect
+ dialect._get_server_version_info = server_version_info
+
+ assert dialect.supports_native_enum
+ e.connect()
+ assert not dialect.supports_native_enum
+
+ # initialize is called again on new pool
+ e.dispose()
+ e.connect()
+ assert not dialect.supports_native_enum
+
def test_reflection(self):
metadata = MetaData(testing.db)