Skip to content
This repository was archived by the owner on Feb 17, 2026. It is now read-only.

Commit 232fc9c

Browse files
committed
Cover legacy protobuf tests
1 parent abd3b35 commit 232fc9c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def unit(session, install_grpc_gcp, install_grpc, install_async_rest):
254254
@nox.session(python=PYTHON_VERSIONS)
255255
def unit_protobuf_4x(session):
256256
"""Run the unit test suite with protobuf 4.x."""
257-
if session.python > "3.11":
257+
if session.python in ["3.9", "3.10", "3.11"]:
258258
session.log("Skipping session: protobuf 4.x only runs on Python < 3.12")
259259
session.skip()
260260
# Pin protobuf to a 4.x version to ensure coverage for the legacy code path.

tests/unit/operations_v1/test_operations_rest_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,9 @@ def test_operations_client_client_options(
374374

375375
# Check the case quota_project_id is provided
376376
options = client_options.ClientOptions(quota_project_id="octopus")
377-
with mock.patch.object(transport_class, "__init__") as patched: # pragma: NO COVER
377+
with mock.patch.object(transport_class, "__init__") as patched:
378378
patched.return_value = None
379-
client = client_class(client_options=options, transport=transport_name)
379+
client = client_class(client_options=options, transport=transport_name) # pragma: NO COVER
380380
patched.assert_called_once_with(
381381
credentials=None,
382382
credentials_file=None,
@@ -386,7 +386,7 @@ def test_operations_client_client_options(
386386
quota_project_id="octopus",
387387
client_info=transports.base.DEFAULT_CLIENT_INFO,
388388
always_use_jwt_access=True,
389-
)
389+
) # pragma: NO COVER
390390

391391
# Check the case credentials_file is provided
392392
with warn_deprecated_credentials_file():

0 commit comments

Comments
 (0)