Skip to content
This repository was archived by the owner on Mar 13, 2026. It is now read-only.

Commit 25beeaa

Browse files
Ilya Gurovlarkee
andauthored
test: add base class for the Spanner specific tests (#158)
Co-authored-by: larkee <31196561+larkee@users.noreply.github.com>
1 parent f99dfe1 commit 25beeaa

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

test/test_suite.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1510,16 +1510,20 @@ class Address(Base):
15101510
assert str(query.statement.compile(session.bind)) == EXPECTED_QUERY
15111511

15121512

1513-
class InterleavedTablesTest(fixtures.TestBase):
1514-
"""
1515-
Check that CREATE TABLE statements for interleaved tables are correctly
1516-
generated.
1517-
"""
1513+
class SpannerSpecificTestBase(fixtures.TestBase):
1514+
"""Base class for the Cloud Spanner related tests."""
15181515

15191516
def setUp(self):
15201517
self._engine = create_engine(get_db_url())
15211518
self._metadata = MetaData(bind=self._engine)
15221519

1520+
1521+
class InterleavedTablesTest(SpannerSpecificTestBase):
1522+
"""
1523+
Check that CREATE TABLE statements for interleaved tables are correctly
1524+
generated.
1525+
"""
1526+
15231527
def test_interleave(self):
15241528
EXP_QUERY = (
15251529
"\nCREATE TABLE client (\n\tteam_id INT64 NOT NULL, "
@@ -1562,13 +1566,9 @@ def test_interleave_on_delete_cascade(self):
15621566
execute.assert_called_once_with(EXP_QUERY, [])
15631567

15641568

1565-
class UserAgentTest(fixtures.TestBase):
1569+
class UserAgentTest(SpannerSpecificTestBase):
15661570
"""Check that SQLAlchemy dialect uses correct user agent."""
15671571

1568-
def setUp(self):
1569-
self._engine = create_engine(get_db_url())
1570-
self._metadata = MetaData(bind=self._engine)
1571-
15721572
def test_user_agent(self):
15731573
dist = pkg_resources.get_distribution("sqlalchemy-spanner")
15741574

0 commit comments

Comments
 (0)