@@ -64,8 +64,7 @@ class = StreamHandler
6464 op.alter_column(
6565 'account',
6666 'name',
67- existing_type=sa.String(50),
68- nullable=True,
67+ existing_type=sa.String(70),
6968 )"""
7069
7170
@@ -114,7 +113,7 @@ def lint_setup_py(session):
114113
115114
116115@nox .session (python = DEFAULT_PYTHON_VERSION )
117- def compliance_test (session ):
116+ def compliance_test_13 (session ):
118117 """Run SQLAlchemy dialect compliance test suite."""
119118
120119 # Check the value of `RUN_COMPLIANCE_TESTS` env var. It defaults to true.
@@ -132,7 +131,6 @@ def compliance_test(session):
132131 "pytest" , "pytest-cov" , "pytest-asyncio" ,
133132 )
134133
135- session .install ("pytest" )
136134 session .install ("mock" )
137135 session .install ("-e" , ".[tracing]" )
138136 session .run ("python" , "create_test_database.py" )
@@ -145,7 +143,46 @@ def compliance_test(session):
145143 "--cov-config=.coveragerc" ,
146144 "--cov-report=" ,
147145 "--cov-fail-under=0" ,
148- "test" ,
146+ "--asyncio-mode=auto" ,
147+ "test/test_suite_13.py" ,
148+ )
149+
150+
151+ @nox .session (python = DEFAULT_PYTHON_VERSION )
152+ def compliance_test_14 (session ):
153+ """Run SQLAlchemy dialect compliance test suite."""
154+
155+ # Check the value of `RUN_COMPLIANCE_TESTS` env var. It defaults to true.
156+ if os .environ .get ("RUN_COMPLIANCE_TESTS" , "true" ) == "false" :
157+ session .skip ("RUN_COMPLIANCE_TESTS is set to false, skipping" )
158+ # Sanity check: Only run tests if the environment variable is set.
159+ if not os .environ .get ("GOOGLE_APPLICATION_CREDENTIALS" , "" ) and not os .environ .get (
160+ "SPANNER_EMULATOR_HOST" , ""
161+ ):
162+ session .skip (
163+ "Credentials or emulator host must be set via environment variable"
164+ )
165+
166+ session .install (
167+ "pytest" , "pytest-cov" , "pytest-asyncio" ,
168+ )
169+
170+ session .install ("mock" )
171+ session .install ("-e" , ".[tracing]" )
172+ session .run ("python" , "create_test_database.py" )
173+
174+ session .install ("sqlalchemy>=1.4" )
175+
176+ session .run (
177+ "py.test" ,
178+ "--cov=google.cloud.sqlalchemy_spanner" ,
179+ "--cov=tests" ,
180+ "--cov-append" ,
181+ "--cov-config=.coveragerc" ,
182+ "--cov-report=" ,
183+ "--cov-fail-under=0" ,
184+ "--asyncio-mode=auto" ,
185+ "test/test_suite_14.py" ,
149186 )
150187
151188
@@ -180,7 +217,7 @@ def migration_test(session):
180217 "GOOGLE_CLOUD_PROJECT" , os .getenv ("PROJECT_ID" , "emulator-test-project" ),
181218 )
182219 db_url = (
183- f"spanner:///projects/{ project } /instances/"
220+ f"spanner+spanner :///projects/{ project } /instances/"
184221 "sqlalchemy-dialect-test/databases/compliance-test"
185222 )
186223
0 commit comments