Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c376d42

Browse files
fix: test fix (googleapis#310)
* chore: auto-release * changes * changes * changes * changes * changes * Without changes * Update noxfile.py * changes * changes --------- Co-authored-by: surbhigarg92 <[email protected]>
1 parent cf6cda1 commit c376d42

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.github/workflows/test_suite.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ jobs:
8585
env:
8686
SPANNER_EMULATOR_HOST: localhost:9010
8787
GOOGLE_CLOUD_PROJECT: appdev-soda-spanner-staging
88+
SQLALCHEMY_SILENCE_UBER_WARNING: 1
8889

8990
migration_tests:
9091
runs-on: ubuntu-latest

noxfile.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,9 @@ def compliance_test_14(session):
190190

191191
session.install("mock")
192192
session.install("-e", ".[tracing]")
193+
session.run("pip", "install", "sqlalchemy>=1.4,<2.0", "--force-reinstall")
193194
session.run("python", "create_test_database.py")
194195

195-
session.install("sqlalchemy>=1.4")
196-
197196
session.run(
198197
"py.test",
199198
"--cov=google.cloud.sqlalchemy_spanner",
@@ -224,7 +223,7 @@ def unit(session):
224223
@nox.session(python=DEFAULT_PYTHON_VERSION)
225224
def migration_test(session):
226225
"""Test migrations with SQLAlchemy v1.3.11+ and Alembic"""
227-
session.run("pip", "install", "sqlalchemy>=1.3.11", "--force-reinstall")
226+
session.run("pip", "install", "sqlalchemy>=1.3.11,<2.0", "--force-reinstall")
228227
_migration_test(session)
229228

230229

@@ -242,6 +241,11 @@ def _migration_test(session):
242241
import os
243242
import shutil
244243

244+
try:
245+
import sqlalchemy
246+
except:
247+
session.run("pip", "install", "sqlalchemy>=1.3.11,<2.0", "--force-reinstall")
248+
245249
session.install("pytest")
246250
session.install("-e", ".")
247251
session.install("alembic")
@@ -307,7 +311,7 @@ def snippets(session):
307311
session.skip("Credentials must be set via environment variable.")
308312

309313
session.install("pytest")
310-
session.install("sqlalchemy")
314+
session.install("sqlalchemy>=1.4,<2.0")
311315
session.install(
312316
"git+https://github.com/googleapis/python-spanner.git#egg=google-cloud-spanner"
313317
)

0 commit comments

Comments
 (0)