4848 # to use your own Cloud project.
4949 "gcloud_project_env" : "GOOGLE_CLOUD_PROJECT" ,
5050 # 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT',
51+ # If you need to use a specific version of pip,
52+ # change pip_version_override to the string representation
53+ # of the version number, for example, "20.2.4"
54+ "pip_version_override" : None ,
5155 # A dictionary you want to inject into your test. Don't put any
5256 # secrets here. These values will override predefined values.
5357 "envs" : {},
@@ -172,6 +176,9 @@ def blacken(session: nox.sessions.Session) -> None:
172176def _session_tests (
173177 session : nox .sessions .Session , post_install : Callable = None
174178) -> None :
179+ if TEST_CONFIG ["pip_version_override" ]:
180+ pip_version = TEST_CONFIG ["pip_version_override" ]
181+ session .install (f"pip=={ pip_version } " )
175182 """Runs py.test for a particular project."""
176183 if os .path .exists ("requirements.txt" ):
177184 if os .path .exists ("constraints.txt" ):
@@ -198,7 +205,7 @@ def _session_tests(
198205 # on travis where slow and flaky tests are excluded.
199206 # See http://doc.pytest.org/en/latest/_modules/_pytest/main.html
200207 success_codes = [0 , 5 ],
201- env = get_pytest_env_vars ()
208+ env = get_pytest_env_vars (),
202209 )
203210
204211
0 commit comments