@@ -110,7 +110,7 @@ def install_prerelease_dependencies(session, constraints_path):
110
110
session .install (* other_deps )
111
111
112
112
113
- def default (session , install_grpc = True , prerelease = False , install_auth_aio = False ):
113
+ def default (session , install_grpc = True , prerelease = False , install_async_rest = False ):
114
114
"""Default unit test session.
115
115
116
116
This is intended to be run **without** an interpreter set, so
@@ -136,20 +136,28 @@ def default(session, install_grpc=True, prerelease=False, install_auth_aio=False
136
136
session , f"{ constraints_dir } /constraints-{ PYTHON_VERSIONS [0 ]} .txt"
137
137
)
138
138
# This *must* be the last install command to get the package from source.
139
- session .install ("-e" , "." , "--no-deps" )
139
+ session .install (
140
+ "-e" , "." + ("[async_rest]" if install_async_rest else "" ), "--no-deps"
141
+ )
140
142
else :
141
143
session .install (
142
144
"-e" ,
143
- ".[grpc]" if install_grpc else "." ,
145
+ "."
146
+ + (
147
+ "[grpc,async_rest]"
148
+ if install_grpc and install_async_rest
149
+ else (
150
+ "[grpc]"
151
+ if install_grpc
152
+ else "[async_rest]"
153
+ if install_async_rest
154
+ else ""
155
+ )
156
+ ),
144
157
"-c" ,
145
158
f"{ constraints_dir } /constraints-{ session .python } .txt" ,
146
159
)
147
160
148
- if install_auth_aio :
149
- session .install (
150
- "google-auth @ git+https://git@github.com/googleapis/google-auth-library-python@8833ad6f92c3300d6645355994c7db2356bd30ad"
151
- )
152
-
153
161
# Print out package versions of dependencies
154
162
session .run (
155
163
"python" , "-c" , "import google.protobuf; print(google.protobuf.__version__)"
@@ -236,9 +244,9 @@ def unit_wo_grpc(session):
236
244
237
245
238
246
@nox .session (python = PYTHON_VERSIONS )
239
- def unit_with_auth_aio (session ):
240
- """Run the unit test suite with google.auth.aio installed """
241
- default (session , install_auth_aio = True )
247
+ def unit_with_async_rest_extra (session ):
248
+ """Run the unit test suite with the `async_rest` extra """
249
+ default (session , install_async_rest = True )
242
250
243
251
244
252
@nox .session (python = DEFAULT_PYTHON_VERSION )
@@ -261,7 +269,7 @@ def mypy(session):
261
269
"""Run type-checking."""
262
270
# TODO(https://github.com/googleapis/python-api-core/issues/682):
263
271
# Use the latest version of mypy instead of mypy<1.11.0
264
- session .install (".[grpc]" , "mypy<1.11.0" )
272
+ session .install (".[grpc,async_rest ]" , "mypy<1.11.0" )
265
273
session .install (
266
274
"types-setuptools" ,
267
275
"types-requests" ,
0 commit comments