Skip to content

Commit ab3a5f7

Browse files
tests: update default runtime used for tests (#2623)
* tests: update default runtime used for tests * fix presubmit * update default version to 3.10 * update format session * revert * revert * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent c7901ee commit ab3a5f7

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

noxfile.py

Lines changed: 21 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.10"
35+
3436
test_dependencies = [
3537
"django>=2.0.0",
3638
"google-auth",
@@ -45,8 +47,24 @@
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
65+
4866

49-
@nox.session(python=["3.7"])
67+
@nox.session(python=DEFAULT_PYTHON_VERSION)
5068
def lint(session):
5169
session.install("flake8")
5270
session.run(
@@ -60,7 +78,7 @@ def lint(session):
6078
)
6179

6280

63-
@nox.session(python="3.8")
81+
@nox.session(python=DEFAULT_PYTHON_VERSION)
6482
def format(session):
6583
"""
6684
Run isort to sort imports. Then run black
@@ -128,7 +146,7 @@ def unit(session, oauth2client):
128146
)
129147

130148

131-
@nox.session(python=["3.9"])
149+
@nox.session(python=DEFAULT_PYTHON_VERSION)
132150
def scripts(session):
133151
session.install(*test_dependencies)
134152
session.install("-e", ".")

0 commit comments

Comments
 (0)