mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-09 15:19:10 +02:00
fix(tests): hoist azure-identity import out of the OBO test timeout window (#4176)
This commit is contained in:
parent
24b594b1e3
commit
11951585c0
1 changed files with 8 additions and 0 deletions
|
|
@ -12,6 +12,14 @@ from fastmcp.server.auth.providers.azure import (
|
|||
)
|
||||
from fastmcp.server.auth.providers.jwt import RSAKeyPair, StaticTokenVerifier
|
||||
|
||||
# Import the optional azure-identity SDK once, at collection time. The OBO
|
||||
# tests mock it via patch("azure.identity.aio.OnBehalfOfCredential"), but the
|
||||
# provider imports it lazily — so without this the heavy SDK import lands
|
||||
# inside the first OBO test's 5s pytest-timeout window and flakes on cold
|
||||
# Windows runners (#4175). importorskip also skips cleanly if the optional
|
||||
# `azure` extra is absent, instead of hard-failing at runtime.
|
||||
pytest.importorskip("azure.identity.aio")
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def memory_storage() -> MemoryStore:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue