Skip to content

Commit e420f47

Browse files
committed
fix coverage: runder under proto 4.x
1 parent 02bdd5d commit e420f47

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

noxfile.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"unit_wo_grpc",
4141
"unit_w_prerelease_deps",
4242
"unit_w_async_rest_extra",
43+
"unit_protobuf_4x", # TODO: Remove once we stop support for protobuf 4.x
4344
"cover",
4445
"pytype",
4546
"mypy",
@@ -250,6 +251,15 @@ def unit(session, install_grpc_gcp, install_grpc, install_async_rest):
250251
)
251252

252253

254+
# TODO: Remove once we stop support for protobuf 4.x.
255+
@nox.session(python=DEFAULT_PYTHON_VERSION)
256+
def unit_protobuf_4x(session):
257+
"""Run the unit test suite with protobuf 4.x."""
258+
# Pin protobuf to a 4.x version to ensure coverage for the legacy code path.
259+
session.install("protobuf>=4.25.8,<5.0.0")
260+
default(session, install_grpc=True)
261+
262+
253263
@nox.session(python=DEFAULT_PYTHON_VERSION)
254264
def prerelease_deps(session):
255265
"""Run the unit test suite."""

0 commit comments

Comments
 (0)