]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
enabled missing reflection tests
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 13 Jun 2009 19:29:19 +0000 (19:29 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 13 Jun 2009 19:29:19 +0000 (19:29 +0000)
lib/sqlalchemy/dialects/sqlite/base.py
lib/sqlalchemy/schema.py
test/engine/test_reflection.py

index c6228ca2f3fdafe131403e00be488f413a6b7bd1..83c405f69f49445058794604f6c4974a95f7890e 100644 (file)
@@ -501,7 +501,7 @@ class SQLiteDialect(default.DefaultDialect):
             indexes.append(dict(name=row[1], column_names=[], unique=row[2]))
         # loop thru unique indexes to get the column names.
         for idx in indexes:
-            c = connection.execute("%sindex_info(%s)" % (pragma, idx['name']))
+            c = connection.execute("%sindex_info(%s)" % (pragma, quote(idx['name'])))
             cols = idx['column_names']
             while True:
                 row = c.fetchone()
index d2ac36e4bd088246439d56136e48fde9ad3e37ab..2cd712476ea6f098b214f617bc483c93f160575d 100644 (file)
@@ -559,10 +559,6 @@ class Column(SchemaItem, expression.ColumnClause):
         if args:
             coltype = args[0]
             
-            # adjust for partials
-            if util.callable(coltype):
-                coltype = args[0]()
-
             if (isinstance(coltype, types.AbstractType) or
                 (isinstance(coltype, type) and
                  issubclass(coltype, types.AbstractType))):
index 758c9313beb7d8aa18722dfbd94a657b70e33db7..33f7190121d9007e5f1af8ebdc02012ca8f408d1 100644 (file)
@@ -571,7 +571,7 @@ class ReflectionTest(TestBase, ComparesTables):
             m9.reflect()
             self.assert_(not m9.tables)
 
-    @testing.fails_on_everything_except('postgres', 'mysql')
+    @testing.fails_on_everything_except('postgres', 'mysql', 'sqlite')
     def test_index_reflection(self):
         m1 = MetaData(testing.db)
         t1 = Table('party', m1,
@@ -878,7 +878,7 @@ def dropViews(con, schema=None):
         con.execute(sa.sql.text(query))
 
 
-class ReflectionTest(TestBase):
+class ComponentReflectionTest(TestBase):
 
     @testing.fails_on('sqlite', 'no schemas')
     def test_get_schema_names(self):