summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-12-05 12:18:11 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2014-12-05 12:18:11 -0500
commitd204e61f63756f2bbd3322377a283fc995e562ec (patch)
treec2be5d411366f2357de8b7be0bafc88144877cbf
parent41e7253dee168b8c26c4993d27aac11f98c7f9e3 (diff)
downloadsqlalchemy-d204e61f63756f2bbd3322377a283fc995e562ec.tar.gz
- document / work around that dialect_options isn't necessarily there
-rw-r--r--lib/sqlalchemy/engine/reflection.py5
-rw-r--r--lib/sqlalchemy/testing/suite/test_reflection.py2
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/sqlalchemy/engine/reflection.py b/lib/sqlalchemy/engine/reflection.py
index ebc96f5dd..25f084c15 100644
--- a/lib/sqlalchemy/engine/reflection.py
+++ b/lib/sqlalchemy/engine/reflection.py
@@ -395,7 +395,10 @@ class Inspector(object):
boolean
dialect_options
- dict of dialect-specific index options
+ dict of dialect-specific index options. May not be present
+ for all dialects.
+
+ .. versionadded:: 1.0.0
:param table_name: string name of the table. For special quoting,
use :class:`.quoted_name`.
diff --git a/lib/sqlalchemy/testing/suite/test_reflection.py b/lib/sqlalchemy/testing/suite/test_reflection.py
index e58b6f068..3edbdeb8c 100644
--- a/lib/sqlalchemy/testing/suite/test_reflection.py
+++ b/lib/sqlalchemy/testing/suite/test_reflection.py
@@ -515,6 +515,8 @@ class ComponentReflectionTest(fixtures.TablesTest):
def test_get_temp_table_indexes(self):
insp = inspect(self.metadata.bind)
indexes = insp.get_indexes('user_tmp')
+ for ind in indexes:
+ ind.pop('dialect_options', None)
eq_(
# TODO: we need to add better filtering for indexes/uq constraints
# that are doubled up