@@ -159,35 +159,37 @@ def mypy(session):
159159
160160
161161@nox .session (python = ALL_PYTHON )
162- @nox .parametrize (["install_extras " ], (True , False ))
163- def unit (session , install_extras ):
162+ @nox .parametrize (["install_deprecated_extras " ], (True , False ))
163+ def unit (session , install_deprecated_extras ):
164164 # Install all test dependencies, then install this package in-place.
165165
166166 min_py , max_py = UNIT_TEST_PYTHON_VERSIONS [0 ], UNIT_TEST_PYTHON_VERSIONS [- 1 ]
167- if not install_extras and session .python not in (min_py , max_py ):
167+ if not install_deprecated_extras and session .python not in (min_py , max_py ):
168168 # only run double tests on first and last supported versions
169169 session .skip (
170170 f"Extended tests only run on boundary Python versions ({ min_py } , { max_py } ) to reduce CI load."
171171 )
172172
173- core_constraints = (
173+ constraints_path = (
174174 CURRENT_DIRECTORY / "testing" / f"constraints-{ session .python } .txt"
175175 )
176- extras_constraints = (
176+ extras_constraints_path = (
177177 CURRENT_DIRECTORY / "testing" / f"constraints-extras-{ session .python } .txt"
178178 )
179179
180- install_args = ["-e" ]
181- if install_extras :
180+ if install_deprecated_extras :
181+ # rsa and oauth2client were both archived and support dropped,
182+ # but we still test old code paths
182183 session .install ("oauth2client" )
183- install_args . append ( ".[testing,enterprise_cert,rsa]" )
184+ extra_str = ".[testing,enterprise_cert,rsa]"
184185 else :
185- install_args . append ( ".[testing]" )
186+ extra_str = ".[testing]"
186187
187- if core_constraints .exists ():
188- install_args .extend (["-c" , str (core_constraints )])
189- if install_extras and extras_constraints .exists ():
190- install_args .extend (["-c" , str (extras_constraints )])
188+ install_args = ["-e" , extra_str ]
189+ if constraints_path .exists ():
190+ install_args .extend (["-c" , str (constraints_path )])
191+ if install_deprecated_extras and extras_constraints_path .exists ():
192+ install_args .extend (["-c" , str (extras_constraints_path )])
191193
192194 session .install (* install_args )
193195 session .run (
0 commit comments