diff options
| author | mike bayer <mike_mp@zzzcomputing.com> | 2020-02-17 22:16:37 +0000 |
|---|---|---|
| committer | Gerrit Code Review <gerrit@bbpush.zzzcomputing.com> | 2020-02-17 22:16:37 +0000 |
| commit | 5ad9e9fbb25decff09104b03904cfe00a2b18916 (patch) | |
| tree | 4823e768516f009eb6c86a4449dfc7931e42b1be /test/dialect/postgresql/test_compiler.py | |
| parent | feb0c6765cd299a809a35b6b6d719bec077dc456 (diff) | |
| parent | 89b8c343ed6247a562e0bcd53ef3fc180d0d4e46 (diff) | |
| download | sqlalchemy-5ad9e9fbb25decff09104b03904cfe00a2b18916.tar.gz | |
Merge "Pass DDLCompiler IdentifierPreparer to visit_ENUM"
Diffstat (limited to 'test/dialect/postgresql/test_compiler.py')
| -rw-r--r-- | test/dialect/postgresql/test_compiler.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/dialect/postgresql/test_compiler.py b/test/dialect/postgresql/test_compiler.py index 4c4c43281..aabbc3ac3 100644 --- a/test/dialect/postgresql/test_compiler.py +++ b/test/dialect/postgresql/test_compiler.py @@ -237,6 +237,22 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL): schema_translate_map=schema_translate_map, ) + def test_create_table_with_schema_type_schema_translate(self): + e1 = Enum("x", "y", "z", name="somename") + e2 = Enum("x", "y", "z", name="somename", schema="someschema") + schema_translate_map = {None: "foo", "someschema": "bar"} + + table = Table( + "some_table", MetaData(), Column("q", e1), Column("p", e2) + ) + from sqlalchemy.schema import CreateTable + + self.assert_compile( + CreateTable(table), + "CREATE TABLE foo.some_table (q foo.somename, p bar.somename)", + schema_translate_map=schema_translate_map, + ) + def test_create_table_with_tablespace(self): m = MetaData() tbl = Table( |
