Skip to content

Commit c09ae2b

Browse files
author
Jesse Whitehouse
committed
Revert overrides since these aren't needed after databricks#328
Signed-off-by: Jesse Whitehouse <[email protected]>
1 parent 7c94ce3 commit c09ae2b

File tree

3 files changed

+2
-56
lines changed

3 files changed

+2
-56
lines changed

src/databricks/sqlalchemy/test/_extra.py

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33

44
import datetime
55

6-
from sqlalchemy import Integer, String, schema, inspect
7-
from sqlalchemy.testing import util
8-
from sqlalchemy.testing.config import requirements
96
from sqlalchemy.testing.suite.test_types import (
107
_LiteralRoundTripFixture,
118
fixtures,
@@ -66,39 +63,8 @@ class DateTimeTZTestCustom(_DateFixture, fixtures.TablesTest):
6663

6764
@testing.requires.datetime_implicit_bound
6865
def test_select_direct(self, connection):
66+
6967
# We need to pass the TIMESTAMP type to the literal function
7068
# so that the value is processed correctly.
7169
result = connection.scalar(select(literal(self.data, TIMESTAMP)))
7270
eq_(result, self.data)
73-
74-
75-
class TableDDLTestCustom(fixtures.TestBase):
76-
"""This test confirms that a table comment can be dropped.
77-
The difference with TableDDLTest is that the comment value is '' and not None after
78-
being dropped.
79-
"""
80-
81-
__backend__ = True
82-
83-
def _simple_fixture(self, schema=None):
84-
return Table(
85-
"test_table",
86-
self.metadata,
87-
Column("id", Integer, primary_key=True, autoincrement=False),
88-
Column("data", String(50)),
89-
schema=schema,
90-
)
91-
92-
@requirements.comment_reflection
93-
@util.provide_metadata
94-
def test_drop_table_comment(self, connection):
95-
table = self._simple_fixture()
96-
table.create(connection, checkfirst=False)
97-
table.comment = "a comment"
98-
connection.execute(schema.SetTableComment(table))
99-
connection.execute(schema.DropTableComment(table))
100-
eq_(inspect(connection).get_table_comment("test_table"), {"text": ""})
101-
102-
103-
class FutureTableDDLTestCustom(fixtures.FutureEngineMixin, TableDDLTestCustom):
104-
pass

src/databricks/sqlalchemy/test/_unsupported.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ class SkipReason(Enum):
5555
TIMEZONE_OPT = "timezone-optional TIMESTAMP fields"
5656
TRANSACTIONS = "transactions"
5757
UNIQUE = "UNIQUE constraints"
58-
DROP_TBL = "drop table comment"
5958

6059

6160
def render_skip_reason(rsn: SkipReason, setup_error=False, extra=False) -> str:
@@ -223,13 +222,6 @@ def test_uuid_returning(self):
223222

224223

225224
class FutureTableDDLTest(FutureTableDDLTest):
226-
@pytest.mark.skip(reason=render_skip_reason(SkipReason.DROP_TBL))
227-
def test_drop_table_comment(self, connection):
228-
"""The DropTableComment statement is supported but it sets the comment to ''
229-
instead of None so this test can't pass.
230-
"""
231-
pass
232-
233225
@pytest.mark.skip(render_skip_reason(SkipReason.INDEXES))
234226
def test_create_index_if_not_exists(self):
235227
"""We could use requirements.index_reflection and requirements.index_ddl_if_exists
@@ -246,13 +238,6 @@ def test_drop_index_if_exists(self):
246238

247239

248240
class TableDDLTest(TableDDLTest):
249-
@pytest.mark.skip(reason=render_skip_reason(SkipReason.DROP_TBL))
250-
def test_drop_table_comment(self, connection):
251-
"""The DropTableComment statement is supported but it sets the comment to ''
252-
instead of None so this test can't pass.
253-
"""
254-
pass
255-
256241
@pytest.mark.skip(reason=render_skip_reason(SkipReason.INDEXES))
257242
def test_create_index_if_not_exists(self, connection):
258243
"""We could use requirements.index_reflection and requirements.index_ddl_if_exists

src/databricks/sqlalchemy/test/test_suite.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,4 @@
1010
from databricks.sqlalchemy.test._regression import *
1111
from databricks.sqlalchemy.test._unsupported import *
1212
from databricks.sqlalchemy.test._future import *
13-
from databricks.sqlalchemy.test._extra import (
14-
TinyIntegerTest,
15-
DateTimeTZTestCustom,
16-
TableDDLTestCustom,
17-
FutureTableDDLTestCustom
18-
)
13+
from databricks.sqlalchemy.test._extra import TinyIntegerTest, DateTimeTZTestCustom

0 commit comments

Comments
 (0)