3333nox .options .sessions = [
3434 "unit" ,
3535 "unit_grpc_gcp" ,
36+ "unit_wo_grpc" ,
3637 "cover" ,
3738 "pytype" ,
3839 "mypy" ,
@@ -78,7 +79,7 @@ def blacken(session):
7879 session .run ("black" , * BLACK_EXCLUDES , * BLACK_PATHS )
7980
8081
81- def default (session ):
82+ def default (session , install_grpc = True ):
8283 """Default unit test session.
8384
8485 This is intended to be run **without** an interpreter set, so
@@ -92,7 +93,10 @@ def default(session):
9293
9394 # Install all test dependencies, then install this package in-place.
9495 session .install ("mock" , "pytest" , "pytest-cov" )
95- session .install ("-e" , ".[grpc]" , "-c" , constraints_path )
96+ if install_grpc :
97+ session .install ("-e" , ".[grpc]" , "-c" , constraints_path )
98+ else :
99+ session .install ("-e" , "." , "-c" , constraints_path )
96100
97101 pytest_args = [
98102 "python" ,
@@ -140,6 +144,12 @@ def unit_grpc_gcp(session):
140144 default (session )
141145
142146
147+ @nox .session (python = ["3.6" , "3.10" ])
148+ def unit_wo_grpc (session ):
149+ """Run the unit test suite w/o grpcio installed"""
150+ default (session , install_grpc = False )
151+
152+
143153@nox .session (python = "3.6" )
144154def lint_setup_py (session ):
145155 """Verify that setup.py is valid (including RST check)."""
0 commit comments