test_initialization_from_environment_variables() — anthropic-sdk-python Function Reference
Architecture documentation for the test_initialization_from_environment_variables() function in test_azure.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD 76304a91_acad_7376_e48d_f1a11e0d45d0["test_initialization_from_environment_variables()"] c3efad89_3ca5_2277_442f_f2552a2c3fbc["TestAsyncAnthropicFoundry"] 76304a91_acad_7376_e48d_f1a11e0d45d0 -->|defined in| c3efad89_3ca5_2277_442f_f2552a2c3fbc f0ec7e84_e12b_f4dc_2a7c_bb0e3930136b["test_initialization_from_environment_variables()"] f0ec7e84_e12b_f4dc_2a7c_bb0e3930136b -->|calls| 76304a91_acad_7376_e48d_f1a11e0d45d0 f0ec7e84_e12b_f4dc_2a7c_bb0e3930136b["test_initialization_from_environment_variables()"] 76304a91_acad_7376_e48d_f1a11e0d45d0 -->|calls| f0ec7e84_e12b_f4dc_2a7c_bb0e3930136b style 76304a91_acad_7376_e48d_f1a11e0d45d0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/lib/test_azure.py lines 97–106
async def test_initialization_from_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None:
"""Test async client initialization falls back to environment variables."""
monkeypatch.setenv("ANTHROPIC_FOUNDRY_API_KEY", "env-key")
monkeypatch.setenv("ANTHROPIC_API_VERSION", "2023-06-01")
monkeypatch.setenv("ANTHROPIC_FOUNDRY_RESOURCE", "env-resource")
client = AsyncAnthropicFoundry()
assert client.api_key == "env-key"
assert "env-resource.services.ai.azure.com" in str(client.base_url)
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_initialization_from_environment_variables() do?
test_initialization_from_environment_variables() is a function in the anthropic-sdk-python codebase, defined in tests/lib/test_azure.py.
Where is test_initialization_from_environment_variables() defined?
test_initialization_from_environment_variables() is defined in tests/lib/test_azure.py at line 97.
What does test_initialization_from_environment_variables() call?
test_initialization_from_environment_variables() calls 1 function(s): test_initialization_from_environment_variables.
What calls test_initialization_from_environment_variables()?
test_initialization_from_environment_variables() is called by 1 function(s): test_initialization_from_environment_variables.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free