summaryrefslogtreecommitdiff
path: root/test/dialect/postgresql/test_compiler.py
diff options
context:
space:
mode:
authorMalik Diarra <malik.diarra@gmail.com>2014-08-13 01:39:09 +0200
committerMalik Diarra <malik.diarra@gmail.com>2014-08-17 01:56:02 +0200
commitef6042ff461e490c2a3040f18f0a3688b2e601a0 (patch)
tree679d9cb74b7d391cbf85fdb6ee60ac5a65b674a4 /test/dialect/postgresql/test_compiler.py
parentb577afcb2bdcd94581606bc911968d8885509769 (diff)
downloadsqlalchemy-ef6042ff461e490c2a3040f18f0a3688b2e601a0.tar.gz
Adding a tablespace options for postgresql create table
Diffstat (limited to 'test/dialect/postgresql/test_compiler.py')
-rw-r--r--test/dialect/postgresql/test_compiler.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/dialect/postgresql/test_compiler.py b/test/dialect/postgresql/test_compiler.py
index b08fb0160..301f80fd4 100644
--- a/test/dialect/postgresql/test_compiler.py
+++ b/test/dialect/postgresql/test_compiler.py
@@ -166,6 +166,12 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL):
"VARCHAR(1), CHECK (somecolumn IN ('x', "
"'y', 'z')))")
+ def test_create_table_with_tablespace(self):
+ m = MetaData()
+ tbl = Table('atable', m, Column("id", Integer), postgresql_tablespace = 'sometablespace')
+ self.assert_compile(schema.CreateTable(tbl),
+ "CREATE TABLE atable (id INTEGER)TABLESPACE sometablespace")
+
def test_create_partial_index(self):
m = MetaData()
tbl = Table('testtbl', m, Column('data', Integer))