Skip to content

Commit bd68ea8

Browse files
author
Jesse Whitehouse
committed
Fix typo in test name for columns. Move .engine and .compile into a base
class. Scaffold in the Table Comment unit tests. Signed-off-by: Jesse Whitehouse <[email protected]>
1 parent 57b6802 commit bd68ea8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/databricks/sqlalchemy/test_local/test_ddl.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22
from sqlalchemy import Column, MetaData, String, Table, create_engine
33
from sqlalchemy.schema import CreateTable, DropColumnComment, SetColumnComment
44

5-
6-
class TestTableCommentDDL:
5+
class DDLTestBase:
76
engine = create_engine(
87
"databricks://token:****@****?http_path=****&catalog=****&schema=****"
98
)
109

1110
def compile(self, stmt):
1211
return str(stmt.compile(bind=self.engine))
1312

13+
14+
class TestColumnCommentDDL(DDLTestBase):
15+
1416
@pytest.fixture
1517
def metadata(self) -> MetaData:
1618
"""Assemble a metadata object with one table containing one column."""
@@ -45,3 +47,6 @@ def test_alter_table_drop_column_comment(self, column):
4547
stmt = DropColumnComment(column)
4648
output = self.compile(stmt)
4749
assert output == "ALTER TABLE foobar ALTER COLUMN foo COMMENT ''"
50+
51+
class TestTableCommentDDL(DDLTestBase):
52+
pass

0 commit comments

Comments
 (0)