@@ -159,27 +159,37 @@ def mypy(session):
159159
160160
161161@nox .session (python = ALL_PYTHON )
162- @nox .parametrize (["install_deprecated_extras " ], (True , False ))
163- def unit (session , install_deprecated_extras ):
162+ @nox .parametrize (["install_extras " ], (True , False ))
163+ def unit (session , install_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_deprecated_extras and session .python not in (min_py , max_py ):
167+ if not install_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- constraints_path = str (
173+ core_constraints = (
174174 CURRENT_DIRECTORY / "testing" / f"constraints-{ session .python } .txt"
175175 )
176- extras_str = "testing"
177- if install_deprecated_extras :
178- # rsa and oauth2client were both archived and support dropped,
179- # but we still test old code paths
176+ extras_constraints = (
177+ CURRENT_DIRECTORY / "testing" / f"constraints-extras-{ session .python } .txt"
178+ )
179+
180+ install_args = ["-e" ]
181+ if install_extras :
180182 session .install ("oauth2client" )
181- extras_str += ",rsa"
182- session .install ("-e" , f".[{ extras_str } ]" , "-c" , constraints_path )
183+ install_args .append (".[testing,enterprise_cert,rsa]" )
184+ else :
185+ install_args .append (".[testing]" )
186+
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 )])
191+
192+ session .install (* install_args )
183193 session .run (
184194 "pytest" ,
185195 f"--junitxml=unit_{ session .python } _sponge_log.xml" ,
0 commit comments