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

Commit e645dc7

Browse files
committed
fix session skip in test
1 parent 232fc9c commit e645dc7

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

noxfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@ 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 in ["3.9", "3.10", "3.11"]:
258-
session.log("Skipping session: protobuf 4.x only runs on Python < 3.12")
257+
if session.python not in ["3.9", "3.10", "3.11"]:
258+
session.log(f"Skipping session for Python {session.python}")
259259
session.skip()
260260
# Pin protobuf to a 4.x version to ensure coverage for the legacy code path.
261261
session.install("protobuf>=4.25.8,<5.0.0")

tests/unit/operations_v1/test_operations_rest_client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,9 @@ def test_operations_client_client_options(
376376
options = client_options.ClientOptions(quota_project_id="octopus")
377377
with mock.patch.object(transport_class, "__init__") as patched:
378378
patched.return_value = None
379-
client = client_class(client_options=options, transport=transport_name) # pragma: NO COVER
379+
client = client_class(
380+
client_options=options, transport=transport_name
381+
) # pragma: NO COVER
380382
patched.assert_called_once_with(
381383
credentials=None,
382384
credentials_file=None,

0 commit comments

Comments
 (0)