test_no_warning_when_output_format_not_provided() — anthropic-sdk-python Function Reference
Architecture documentation for the test_no_warning_when_output_format_not_provided() function in test_output_format_conversion.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD 2ba6d02b_6ab9_b205_7762_d98482434c2f["test_no_warning_when_output_format_not_provided()"] 16f322e6_6eea_a8f2_83a5_9fdca56649bd["TestOutputFormatDeprecation"] 2ba6d02b_6ab9_b205_7762_d98482434c2f -->|defined in| 16f322e6_6eea_a8f2_83a5_9fdca56649bd style 2ba6d02b_6ab9_b205_7762_d98482434c2f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/api_resources/beta/test_output_format_conversion.py lines 258–282
def test_no_warning_when_output_format_not_provided(self, client: Anthropic, respx_mock: MockRouter) -> None:
"""Verify no deprecation warning when output_format is not used."""
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 warnings.catch_warnings():
warnings.simplefilter("error", DeprecationWarning)
# Should not raise any warnings
client.beta.messages.create(
max_tokens=1024,
messages=[{"role": "user", "content": "Test"}],
model="claude-sonnet-4-5",
)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_no_warning_when_output_format_not_provided() do?
test_no_warning_when_output_format_not_provided() is a function in the anthropic-sdk-python codebase, defined in tests/api_resources/beta/test_output_format_conversion.py.
Where is test_no_warning_when_output_format_not_provided() defined?
test_no_warning_when_output_format_not_provided() is defined in tests/api_resources/beta/test_output_format_conversion.py at line 258.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free