test_async_methods_emit_deprecation_warnings() — anthropic-sdk-python Function Reference
Architecture documentation for the test_async_methods_emit_deprecation_warnings() function in test_output_format_conversion.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD d6b3d2e8_b964_d94d_b290_489fb9d5b9b5["test_async_methods_emit_deprecation_warnings()"] f4e94c7e_0d29_a411_d608_f21a1ae40401["TestAsyncOutputFormatConversion"] d6b3d2e8_b964_d94d_b290_489fb9d5b9b5 -->|defined in| f4e94c7e_0d29_a411_d608_f21a1ae40401 style d6b3d2e8_b964_d94d_b290_489fb9d5b9b5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/api_resources/beta/test_output_format_conversion.py lines 569–594
async def test_async_methods_emit_deprecation_warnings(
self, async_client: AsyncAnthropic, respx_mock: MockRouter
) -> None:
"""Verify async methods emit DeprecationWarning."""
respx_mock.post("/v1/messages?beta=true").mock(
return_value=httpx.Response(
200,
json={
"id": "msg_123",
"type": "message",
"role": "assistant",
"model": "claude-sonnet-4-5",
"content": [{"text": "test", "type": "text"}],
"stop_reason": "end_turn",
"usage": {"input_tokens": 10, "output_tokens": 20},
},
)
)
with pytest.warns(DeprecationWarning, match="output_format.*deprecated"):
await async_client.beta.messages.create(
max_tokens=1024,
messages=[{"role": "user", "content": "Test"}],
model="claude-sonnet-4-5",
output_format={"type": "json_schema", "schema": {"type": "object"}},
)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_async_methods_emit_deprecation_warnings() do?
test_async_methods_emit_deprecation_warnings() is a function in the anthropic-sdk-python codebase, defined in tests/api_resources/beta/test_output_format_conversion.py.
Where is test_async_methods_emit_deprecation_warnings() defined?
test_async_methods_emit_deprecation_warnings() is defined in tests/api_resources/beta/test_output_format_conversion.py at line 569.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free