Skip to content

Commit fb410f4

Browse files
committed
fix session skip in test
1 parent 39992e3 commit fb410f4

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
@@ -255,8 +255,8 @@ def unit(session, install_grpc_gcp, install_grpc, install_async_rest):
255255
@nox.session(python=PYTHON_VERSIONS)
256256
def unit_protobuf_4x(session):
257257
"""Run the unit test suite with protobuf 4.x."""
258-
if session.python in ["3.9", "3.10", "3.11"]:
259-
session.log("Skipping session: protobuf 4.x only runs on Python < 3.12")
258+
if session.python not in ["3.9", "3.10", "3.11"]:
259+
session.log(f"Skipping session for Python {session.python}")
260260
session.skip()
261261
# Pin protobuf to a 4.x version to ensure coverage for the legacy code path.
262262
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
@@ -356,7 +356,9 @@ def test_operations_client_client_options(
356356
options = client_options.ClientOptions(quota_project_id="octopus")
357357
with mock.patch.object(transport_class, "__init__") as patched:
358358
patched.return_value = None
359-
client = client_class(client_options=options, transport=transport_name) # pragma: NO COVER
359+
client = client_class(
360+
client_options=options, transport=transport_name
361+
) # pragma: NO COVER
360362
patched.assert_called_once_with(
361363
credentials=None,
362364
credentials_file=None,

0 commit comments

Comments
 (0)