Skip to content

Commit aac33df

Browse files
authored
test: add session to test with nightly dependencies (#449)
This should catch errors introduced in the next versions of dependency packages.
1 parent 079b6a1 commit aac33df

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Only run this nox session.
4+
env_vars: {
5+
key: "NOX_SESSION"
6+
value: "prerelease_deps"
7+
}

noxfile.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,38 @@ def cover(session):
168168
session.run("coverage", "erase")
169169

170170

171+
@nox.session(python="3.8")
172+
def prerelease_deps(session):
173+
"""Run all tests with prerelease versions of dependencies installed.
174+
175+
https://github.com/googleapis/python-bigquery/issues/95
176+
"""
177+
# PyArrow prerelease packages are published to an alternative PyPI host.
178+
# https://arrow.apache.org/docs/python/install.html#installing-nightly-packages
179+
session.install(
180+
"--extra-index-url", "https://pypi.fury.io/arrow-nightlies/", "--pre", "pyarrow"
181+
)
182+
session.install("--pre", "grpcio", "pandas")
183+
session.install(
184+
"mock",
185+
"pytest",
186+
"google-cloud-testutils",
187+
"pytest-cov",
188+
"freezegun",
189+
"IPython",
190+
)
191+
session.install("-e", ".[all]")
192+
193+
# Print out prerelease package versions.
194+
session.run("python", "-c", "import grpc; print(grpc.__version__)")
195+
session.run("python", "-c", "import pandas; print(pandas.__version__)")
196+
session.run("python", "-c", "import pyarrow; print(pyarrow.__version__)")
197+
198+
# Run all tests, except a few samples tests which require extra dependencies.
199+
session.run("py.test", "tests")
200+
session.run("py.test", "samples/tests")
201+
202+
171203
@nox.session(python="3.8")
172204
def lint(session):
173205
"""Run linters.

0 commit comments

Comments
 (0)