MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / slow_load

Function slow_load

tests/lib/test_google_cloud.py:428–432  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

426 load_calls = 0
427
428 def slow_load() -> Any:
429 nonlocal load_calls
430 load_calls += 1
431 time.sleep(0.05)
432 return _FakeCredentials(token="adc-token"), None
433
434 monkeypatch.setattr("anthropic.lib.google_cloud._client._load_adc_credentials", slow_load)
435 client = AnthropicGoogleCloud(base_url="https://example.test/", workspace_id="wrkspc_x")

Callers

nothing calls this directly

Calls 2

_FakeCredentialsClass · 0.85
sleepMethod · 0.80

Tested by

no test coverage detected