(self, type_: testing.Variation)
| 88 | |
| 89 | @testing.variation("type_", ["create_table_as", "create_view"]) |
| 90 | def test_quoting(self, type_: testing.Variation): |
| 91 | |
| 92 | src = Table( |
| 93 | "SourceTable", |
| 94 | MetaData(), |
| 95 | Column("Some Name", Integer), |
| 96 | Column("Other Col", String), |
| 97 | ) |
| 98 | if type_.create_table_as: |
| 99 | stmt = CreateTableAs( |
| 100 | select(src), |
| 101 | "My Analytic Table", |
| 102 | schema="Analysis", |
| 103 | ) |
| 104 | elif type_.create_view: |
| 105 | stmt = CreateView( |
| 106 | select(src), |
| 107 | "My Analytic View", |
| 108 | schema="Analysis", |
| 109 | ) |
| 110 | else: |
| 111 | type_.fail() |
| 112 | |
| 113 | self.assert_compile( |
| 114 | stmt, |
| 115 | f'CREATE {"TABLE" if type_.create_table_as else "VIEW"} ' |
| 116 | f'"Analysis"."My Analytic ' |
| 117 | f'{"Table" if type_.create_table_as else "View"}" AS SELECT ' |
| 118 | f'"SourceTable"."Some Name", "SourceTable"."Other Col" ' |
| 119 | f'FROM "SourceTable"', |
| 120 | ) |
| 121 | |
| 122 | @testing.variation("type_", ["create_table_as", "create_view"]) |
| 123 | def test_blank_schema_treated_as_none( |
nothing calls this directly
no test coverage detected