From f685eab0d31a5c30b8a3ada5392e43795ffacc18 Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Fri, 18 Sep 2026 03:16:28 -0700 Subject: [PATCH] fix(tests): gate test_mcp_oauth_metadata on the MCP SDK The module hard-imported mcp.shared.auth and errored at collection on a default install; importorskip it like test_mcp_oauth_missing_iss.py. --- tests/tools/test_mcp_oauth_metadata.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/tools/test_mcp_oauth_metadata.py b/tests/tools/test_mcp_oauth_metadata.py index 335e08188b..ed9b1792a4 100644 --- a/tests/tools/test_mcp_oauth_metadata.py +++ b/tests/tools/test_mcp_oauth_metadata.py @@ -24,7 +24,9 @@ from unittest.mock import AsyncMock, MagicMock, patch import pytest -from mcp.shared.auth import OAuthMetadata +pytest.importorskip("mcp.shared.auth", reason="MCP SDK not installed") + +from mcp.shared.auth import OAuthMetadata # noqa: E402 from tools.mcp_oauth import HermesTokenStorage from tools.mcp_oauth_manager import _HERMES_PROVIDER_CLS