summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-07-20 21:01:51 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-07-20 21:01:51 +0000
commitbdf8f4ca80ed2a49bb4f1beea57ca5e1061681cf (patch)
tree1375f33a18541903aa74fa9a4e0fe4ea6c3ef28d
parent9aa1b946edb6e135472c2f7b598f2a1d3db167d9 (diff)
downloadsqlalchemy-bdf8f4ca80ed2a49bb4f1beea57ca5e1061681cf.tar.gz
postgres cant do this particular test b.c. the default "public" schema is takenrel_0_3_10
as a blank "schema" argument on Table
-rw-r--r--test/engine/reflection.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/engine/reflection.py b/test/engine/reflection.py
index 666f3b326..74ae75e2e 100644
--- a/test/engine/reflection.py
+++ b/test/engine/reflection.py
@@ -608,11 +608,13 @@ class SchemaTest(PersistTest):
assert buf.index("CREATE TABLE someschema.table1") > -1
assert buf.index("CREATE TABLE someschema.table2") > -1
- @testbase.unsupported('sqlite')
- def testcreate(self):
+ @testbase.unsupported('sqlite', 'postgres')
+ def test_create_with_defaultschema(self):
engine = testbase.db
schema = engine.dialect.get_default_schema_name(engine)
+ # test reflection of tables with an explcit schemaname
+ # matching the default
metadata = MetaData(testbase.db)
table1 = Table('table1', metadata,
Column('col1', Integer, primary_key=True),
@@ -626,6 +628,8 @@ class SchemaTest(PersistTest):
metadata.clear()
table1 = Table('table1', metadata, autoload=True, schema=schema)
table2 = Table('table2', metadata, autoload=True, schema=schema)
+ assert table1.schema == table2.schema == schema
+ assert len(metadata.tables) == 2
metadata.drop_all()