summaryrefslogtreecommitdiff
path: root/test/dialect/postgresql
diff options
context:
space:
mode:
authorPete Hollobon <phollobon@renshawbay.com>2015-06-04 15:12:09 +0100
committerPete Hollobon <phollobon@renshawbay.com>2015-06-04 15:12:09 +0100
commitb03ee45f32e53416ce1c73fa15966db17ed4bbf9 (patch)
treef4b308a868841804adee29bfc508ac6e57101908 /test/dialect/postgresql
parentdff81500b161cf41ff5d9e77c21a24010e1bd93b (diff)
downloadsqlalchemy-b03ee45f32e53416ce1c73fa15966db17ed4bbf9.tar.gz
Add reflection of PostgreSQL index storage options
Diffstat (limited to 'test/dialect/postgresql')
-rw-r--r--test/dialect/postgresql/test_reflection.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/dialect/postgresql/test_reflection.py b/test/dialect/postgresql/test_reflection.py
index 0ebe68cba..70b81219e 100644
--- a/test/dialect/postgresql/test_reflection.py
+++ b/test/dialect/postgresql/test_reflection.py
@@ -673,6 +673,26 @@ class ReflectionTest(fixtures.TestBase):
conn.close()
@testing.provide_metadata
+ def test_index_reflection_with_storage_options(self):
+ """reflect indexes with storage options set"""
+
+ metadata = self.metadata
+
+ t1 = Table('t', metadata,
+ Column('id', Integer, primary_key=True),
+ Column('x', Integer)
+ )
+ metadata.create_all()
+ conn = testing.db.connect().execution_options(autocommit=True)
+ conn.execute("CREATE INDEX idx1 ON t (x) WITH (fillfactor = 50)")
+
+ ind = testing.db.dialect.get_indexes(conn, "t", None)
+ eq_(ind, [{'unique': False, 'column_names': ['x'], 'name': 'idx1',
+ 'dialect_options': {"postgresql_with": {"fillfactor": "50"}}}])
+ conn.close()
+
+
+ @testing.provide_metadata
def test_foreign_key_option_inspection(self):
metadata = self.metadata
Table(