Skip to content

Commit 73aa775

Browse files
committed
tests: update default runtime used for tests
1 parent 6bf9786 commit 73aa775

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

noxfile.py

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
"setup.py",
3232
]
3333

34+
DEFAULT_PYTHON_VERSION = "3.12"
35+
3436
test_dependencies = [
3537
"django>=2.0.0",
3638
"google-auth",
@@ -45,8 +47,23 @@
4547
"coverage",
4648
]
4749

50+
nox.options.sessions = [
51+
# TODO(https://github.com/googleapis/google-api-python-client/issues/2622):
52+
# Remove or restore testing for Python 3.7/3.8
53+
"unit-3.9",
54+
"unit-3.10",
55+
"unit-3.11",
56+
"unit-3.12",
57+
"unit-3.13",
58+
"lint",
59+
"format",
60+
"scripts",
61+
]
62+
63+
# Error if a python version is missing
64+
nox.options.error_on_missing_interpreters = True
4865

49-
@nox.session(python=["3.7"])
66+
@nox.session(python=DEFAULT_PYTHON_VERSION)
5067
def lint(session):
5168
session.install("flake8")
5269
session.run(
@@ -60,7 +77,7 @@ def lint(session):
6077
)
6178

6279

63-
@nox.session(python="3.8")
80+
@nox.session(python=DEFAULT_PYTHON_VERSION)
6481
def format(session):
6582
"""
6683
Run isort to sort imports. Then run black
@@ -128,7 +145,7 @@ def unit(session, oauth2client):
128145
)
129146

130147

131-
@nox.session(python=["3.9"])
148+
@nox.session(python=DEFAULT_PYTHON_VERSION)
132149
def scripts(session):
133150
session.install(*test_dependencies)
134151
session.install("-e", ".")

0 commit comments

Comments
 (0)