Skip to content

Commit 9581aea

Browse files
test: select compliance tests (#47)
* test: select compliance tests * test: enable more tests * test: remove test skip of null datatype * test: remove redundant code * test: add issue reference Co-authored-by: larkee <[email protected]>
1 parent a2902be commit 9581aea

File tree

1 file changed

+83
-24
lines changed

1 file changed

+83
-24
lines changed

test/test_suite.py

+83-24
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
from sqlalchemy.testing.suite.test_insert import * # noqa: F401, F403
6161
from sqlalchemy.testing.suite.test_reflection import * # noqa: F401, F403
6262
from sqlalchemy.testing.suite.test_results import * # noqa: F401, F403
63+
from sqlalchemy.testing.suite.test_select import * # noqa: F401, F403
6364
from sqlalchemy.testing.suite.test_sequence import * # noqa: F401, F403
6465
from sqlalchemy.testing.suite.test_update_delete import * # noqa: F401, F403
6566

@@ -72,21 +73,19 @@
7273
from sqlalchemy.testing.suite.test_insert import (
7374
InsertBehaviorTest as _InsertBehaviorTest,
7475
)
75-
from sqlalchemy.testing.suite.test_reflection import (
76-
ComponentReflectionTest as _ComponentReflectionTest,
76+
from sqlalchemy.testing.suite.test_select import ( # noqa: F401, F403
77+
CompoundSelectTest as _CompoundSelectTest,
78+
ExistsTest as _ExistsTest,
79+
IsOrIsNotDistinctFromTest as _IsOrIsNotDistinctFromTest,
80+
LikeFunctionsTest as _LikeFunctionsTest,
81+
OrderByLabelTest as _OrderByLabelTest,
7782
)
7883
from sqlalchemy.testing.suite.test_reflection import (
7984
QuotedNameArgumentTest as _QuotedNameArgumentTest,
80-
)
81-
from sqlalchemy.testing.suite.test_reflection import (
85+
ComponentReflectionTest as _ComponentReflectionTest,
8286
CompositeKeyReflectionTest as _CompositeKeyReflectionTest,
8387
)
8488
from sqlalchemy.testing.suite.test_results import RowFetchTest as _RowFetchTest
85-
from sqlalchemy.testing.suite.test_select import ExistsTest as _ExistsTest
86-
from sqlalchemy.testing.suite.test_select import (
87-
IsOrIsNotDistinctFromTest as _IsOrIsNotDistinctFromTest,
88-
)
89-
from sqlalchemy.testing.suite.test_select import OrderByLabelTest as _OrderByLabelTest
9089
from sqlalchemy.testing.suite.test_types import ( # noqa: F401, F403
9190
BooleanTest as _BooleanTest,
9291
DateTest as _DateTest,
@@ -938,16 +937,6 @@ def test_autoclose_on_insert(self):
938937
assert not r.returns_rows
939938

940939

941-
@pytest.mark.skip("Spanner doesn't support IS DISTINCT FROM clause")
942-
class IsOrIsNotDistinctFromTest(_IsOrIsNotDistinctFromTest):
943-
pass
944-
945-
946-
@pytest.mark.skip("Spanner doesn't support composed GROUP BY")
947-
class OrderByLabelTest(_OrderByLabelTest):
948-
pass
949-
950-
951940
class BytesTest(_LiteralRoundTripFixture, fixtures.TestBase):
952941
__backend__ = True
953942

@@ -959,11 +948,6 @@ def test_nolength_binary(self):
959948
foo.drop(config.db)
960949

961950

962-
@pytest.mark.skip("Spanner doesn't support quotes in table names.")
963-
class QuotedNameArgumentTest(_QuotedNameArgumentTest):
964-
pass
965-
966-
967951
class StringTest(_StringTest):
968952
@pytest.mark.skip("Spanner doesn't support non-ascii characters")
969953
def test_literal_non_ascii(self):
@@ -1339,3 +1323,78 @@ def test_enotation_decimal(self):
13391323
[decimal.Decimal("696E-9")],
13401324
[decimal.Decimal("696E-9")],
13411325
)
1326+
1327+
1328+
class LikeFunctionsTest(_LikeFunctionsTest):
1329+
@pytest.mark.skip("Spanner does not support ESCAPE")
1330+
def test_contains_autoescape(self):
1331+
pass
1332+
1333+
@pytest.mark.skip("Spanner does not support ESCAPE")
1334+
def test_contains_autoescape_escape(self):
1335+
pass
1336+
1337+
@pytest.mark.skip("Spanner does not support ESCAPE")
1338+
def test_contains_escape(self):
1339+
pass
1340+
1341+
@pytest.mark.skip("Spanner does not support ESCAPE")
1342+
def test_endswith_autoescape(self):
1343+
pass
1344+
1345+
@pytest.mark.skip("Spanner does not support ESCAPE")
1346+
def test_endswith_escape(self):
1347+
pass
1348+
1349+
@pytest.mark.skip("Spanner does not support ESCAPE")
1350+
def test_endswith_autoescape_escape(self):
1351+
pass
1352+
1353+
@pytest.mark.skip("Spanner does not support ESCAPE")
1354+
def test_startswith_autoescape(self):
1355+
pass
1356+
1357+
@pytest.mark.skip("Spanner does not support ESCAPE")
1358+
def test_startswith_escape(self):
1359+
pass
1360+
1361+
@pytest.mark.skip("Spanner does not support ESCAPE")
1362+
def test_startswith_autoescape_escape(self):
1363+
pass
1364+
1365+
1366+
@pytest.mark.skip("Spanner doesn't support quotes in table names.")
1367+
class QuotedNameArgumentTest(_QuotedNameArgumentTest):
1368+
pass
1369+
1370+
1371+
@pytest.mark.skip("Spanner doesn't support IS DISTINCT FROM clause")
1372+
class IsOrIsNotDistinctFromTest(_IsOrIsNotDistinctFromTest):
1373+
pass
1374+
1375+
1376+
class OrderByLabelTest(_OrderByLabelTest):
1377+
@pytest.mark.skip(
1378+
"Spanner requires an alias for the GROUP BY list when specifying derived "
1379+
"columns also used in SELECT"
1380+
)
1381+
def test_group_by_composed(self):
1382+
pass
1383+
1384+
1385+
class CompoundSelectTest(_CompoundSelectTest):
1386+
"""
1387+
See: https://github.com/googleapis/python-spanner/issues/347
1388+
"""
1389+
1390+
@pytest.mark.skip(
1391+
"Spanner DBAPI incorrectly classify the statement starting with brackets."
1392+
)
1393+
def test_limit_offset_selectable_in_unions(self):
1394+
pass
1395+
1396+
@pytest.mark.skip(
1397+
"Spanner DBAPI incorrectly classify the statement starting with brackets."
1398+
)
1399+
def test_order_by_selectable_in_unions(self):
1400+
pass

0 commit comments

Comments
 (0)