MCPcopy Create free account

hub / github.com/anthropics/anthropic-sdk-python / functions

Functions9,455 in github.com/anthropics/anthropic-sdk-python

Methodtest_non_anthropic_error_from_provider_releases_waiters
A non-`AnthropicError` / non-`httpx2.HTTPError` from the leader provider must still release `_refresh_event` so concurrent waiters don
tests/lib/test_credentials.py:3998
Methodtest_non_application_json_content_type_for_json_data
Response that sets Content-Type to something other than application/json but returns json data
tests/test_client.py:979
Methodtest_non_application_json_content_type_for_json_data
Response that sets Content-Type to something other than application/json but returns json data
tests/test_client.py:2280
Methodtest_non_bearer_token_type_rejected
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:1352
Methodtest_non_json_response_does_not_retain_assertion
(self)
tests/lib/test_credentials.py:4479
Methodtest_non_str_token_does_not_crash_repr
(self)
tests/lib/test_credentials.py:4363
Methodtest_non_streaming
(self, sync_client: AnthropicGoogleCloud)
tests/lib/test_google_cloud_live.py:58
Methodtest_non_streaming
(self, async_client: AsyncAnthropicGoogleCloud)
tests/lib/test_google_cloud_live.py:95
Methodtest_nothing_is_logged_for_non_streaming_retries
( self, respx_mock: MockRouter, caplog: pytest.LogCaptureFixture )
tests/lib/test_refusal_fallback.py:818
Methodtest_nothing_set_returns_none
(self)
tests/lib/test_credentials.py:2244
Functiontest_null_schema
()
tests/lib/_parse/test_transform.py:203
Functiontest_object_schema
()
tests/lib/_parse/test_transform.py:102
Functiontest_objects_with_a_read_method_are_not_files
(send: Send, monkeypatch: pytest.MonkeyPatch)
tests/test_prepare.py:633
Functiontest_of_one_reports_changes_for_a_download_only_the_latest_reaches_the_model
()
tests/lib/tools/toolsets/test_pipeline.py:666
Functiontest_of_the_changes_held_for_one_download_the_newest_is_the_one_carried_forward
()
tests/lib/tools/toolsets/test_pipeline.py:646
Methodtest_oidc_federation
(self, respx_mock: MockRouter, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:3021
Methodtest_oidc_federation_no_credentials_path_no_disk_cache
Without `authentication.credentials_path`, every call exchanges fresh — nothing is written to disk.
tests/lib/test_credentials.py:3070
Methodtest_oidc_federation_with_credentials_path_disk_cache
With `authentication.credentials_path` set, the exchanged token is written to that path and a second call returns it without re-exchanging.
tests/lib/test_credentials.py:3091
Methodtest_omit_headers_case_insensitive
(self, client: Anthropic)
tests/test_client.py:496
Methodtest_omit_headers_case_insensitive
(self, async_client: AsyncAnthropic)
tests/test_client.py:1793
Methodtest_omit_retry_count_header
( self, client: Anthropic, failures_before_success: int, respx_mock: MockRoute
tests/test_client.py:1277
Methodtest_omit_retry_count_header
( self, async_client: AsyncAnthropic, failures_before_success: int, respx_mock
tests/test_client.py:2591
Functiontest_omitted_fields
()
tests/test_models.py:490
Methodtest_one_forced_call_per_invalidate_in_per_request_mode
P0 is a per-request call that starts before invalidate() and finishes after it.
tests/lib/test_credentials.py:3681
Methodtest_one_state_shared_across_threads
(self)
tests/lib/test_refusal_fallback.py:775
Methodtest_oneshot_exchange_failure_does_not_retain_assertion
`exchange_federation_assertion` holds the caller's assertion as a parameter in its own (SDK-owned) frame; it is rebound to SecretStr on
tests/lib/test_credentials.py:4760
Functiontest_only_the_changed_memory_is_fetched
(tmp_path: Path)
tests/lib/tools/memory_sync/test_two_pass.py:46
Functiontest_optional_list
()
tests/test_models.py:203
Functiontest_optional_list_nested_model
()
tests/test_models.py:73
Functiontest_optional_nested_model
()
tests/test_models.py:37
Functiontest_options_do_not_leak_into_the_entry
()
tests/lib/tools/toolsets/test_interface.py:299
Functiontest_options_do_not_leak_into_the_entry
()
tests/lib/tools/toolsets/test_computer_interface.py:214
Functiontest_original_schema_not_mutated
()
tests/lib/_parse/test_transform.py:215
Functiontest_other_iterables_are_not_iterated
(send: Send, value: object)
tests/test_prepare.py:278
Functiontest_other_path_likes_are_not_read
(send: Send, file: object, monkeypatch: pytest.MonkeyPatch)
tests/test_prepare.py:652
Methodtest_other_providers_do_not
(self)
tests/lib/test_credentials.py:193
Methodtest_output_config_subfields_do_not_leak_into_the_next_hop
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:488
Methodtest_output_config_subfields_patch_one_level_deep
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:388
Methodtest_output_config_subfields_seed_a_missing_original
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:435
Functiontest_override_detection_sees_dynamic_assignment_and_intermediate_classes
()
tests/lib/tools/toolsets/test_interface.py:280
Functiontest_override_detection_sees_intermediate_classes_and_dynamic_assignment
()
tests/lib/tools/toolsets/test_computer_interface.py:196
Methodtest_oversized_assertion_not_retained
(self)
tests/lib/test_credentials.py:4512
Methodtest_oversized_assertion_rejected
(self)
tests/lib/test_credentials.py:1341
Methodtest_oversized_response_body_rejected
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:1377
Methodtest_overwrite_retry_count_header
( self, client: Anthropic, failures_before_success: int, respx_mock: MockRoute
tests/test_client.py:1315
Methodtest_overwrite_retry_count_header
( self, async_client: AsyncAnthropic, failures_before_success: int, respx_mock
tests/test_client.py:2629
Functiontest_page_and_model_text_is_folded_the_same_in_both_sdks
(fn: str, raw: str, shown: str)
tests/lib/tools/toolsets/test_pipeline.py:870
Methodtest_parse_caller_beta_header_overrides
(self, client: Anthropic, respx_mock: respx.MockRouter)
tests/lib/test_stainless_helpers.py:145
Methodtest_parse_caller_beta_header_overrides
( self, async_client: AsyncAnthropic, respx_mock: respx.MockRouter )
tests/lib/test_stainless_helpers.py:245
Methodtest_parse_converts_pydantic_to_output_config
Verify .parse() converts Pydantic models to output_config.format.
tests/api_resources/beta/test_output_format_conversion.py:18
Methodtest_parse_does_not_add_beta_header
Verify .parse() sends no beta header when the caller passes no betas.
tests/api_resources/beta/test_output_format_conversion.py:218
Methodtest_parse_does_not_warn_for_type
`.parse(output_format=Model)` is silent.
tests/api_resources/beta/test_output_format_conversion.py:76
Methodtest_parse_in_middleware_shares_parse_cache
(self, respx_mock: MockRouter)
tests/test_middleware.py:1027
Methodtest_parse_in_middleware_shares_parse_cache
(self, respx_mock: MockRouter)
tests/test_middleware.py:1552
Methodtest_parse_merges_caller_extra_headers
(self, client: Anthropic, respx_mock: respx.MockRouter)
tests/lib/test_stainless_helpers.py:123
Methodtest_parse_merges_caller_extra_headers
( self, async_client: AsyncAnthropic, respx_mock: respx.MockRouter )
tests/lib/test_stainless_helpers.py:224
Functiontest_parse_method_definition_in_sync
(sync: bool)
tests/lib/streaming/test_beta_messages.py:937
Methodtest_parse_rejects_both_output_format_and_config
Verify .parse() raises error when both output_format and output_config.format are provided.
tests/api_resources/beta/test_output_format_conversion.py:198
Methodtest_parse_retry_after_header
( self, remaining_retries: int, retry_after: str, timeout: float, clie
tests/test_client.py:1175
Methodtest_parse_retry_after_header
( self, remaining_retries: int, retry_after: str, timeout: float, asyn
tests/test_client.py:2489
Methodtest_parse_sends_caller_betas_unchanged
Verify .parse() sends exactly the betas the caller passes.
tests/api_resources/beta/test_output_format_conversion.py:250
Methodtest_parse_sends_explicit_structured_outputs_beta_once
Verify .parse() sends the structured-outputs beta once when the caller passes it.
tests/api_resources/beta/test_output_format_conversion.py:283
Methodtest_parse_sends_single_header_line
(self, client: Anthropic, respx_mock: respx.MockRouter)
tests/lib/test_stainless_helpers.py:97
Methodtest_parse_sends_single_header_line
( self, async_client: AsyncAnthropic, respx_mock: respx.MockRouter )
tests/lib/test_stainless_helpers.py:196
Methodtest_parse_uses_output_config
(self, async_snapshot_client: AsyncAnthropic)
tests/lib/_parse/test_beta_messages.py:55
Methodtest_parse_with_nested_pydantic_model
Test sync messages.parse() with nested Pydantic models.
tests/lib/_parse/test_messages.py:56
Methodtest_parse_with_nested_pydantic_model
Test async messages.parse() with nested Pydantic models.
tests/lib/_parse/test_messages.py:113
Methodtest_parse_with_pydantic_model
Test sync messages.parse() with a Pydantic model output_format.
tests/lib/_parse/test_messages.py:29
Methodtest_parse_with_pydantic_model
Test async messages.parse() with a Pydantic model output_format.
tests/lib/_parse/test_messages.py:86
Functiontest_parsed_output_is_readable_but_not_dumped
(block_type: Any)
tests/lib/streaming/test_parsed_content_blocks.py:104
Functiontest_parsed_union_matches_generated_union
The hand-written Parsed*ContentBlock unions must track the generated unions. If a block type only exists in the generated union, streaming snapsh
tests/lib/streaming/test_parsed_content_blocks.py:48
Functiontest_partial_creds_access_key_only
()
tests/lib/test_aws.py:100
Functiontest_partial_creds_async_access_key_only
()
tests/lib/test_aws.py:110
Functiontest_partial_creds_secret_key_only
()
tests/lib/test_aws.py:105
Methodtest_partial_json_with_invalid_json
Test that invalid JSON raises an error.
tests/lib/streaming/test_partial_json.py:108
Methodtest_partial_of_a_callable_object_is_awaited
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:3477
Methodtest_pass_through_preserves_sse_fields_beyond_event_and_data
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:529
Methodtest_path_params_ack
(self, client: Anthropic)
tests/api_resources/beta/environments/test_work.py:237
Methodtest_path_params_ack
(self, async_client: AsyncAnthropic)
tests/api_resources/beta/environments/test_work.py:684
Methodtest_path_params_add
(self, client: Anthropic)
tests/api_resources/beta/sessions/test_resources.py:304
Methodtest_path_params_add
(self, async_client: AsyncAnthropic)
tests/api_resources/beta/sessions/test_resources.py:597
Methodtest_path_params_add
(self, client: Anthropic)
tests/api_resources/beta/organization/federation/rules/test_workspaces.py:114
Methodtest_path_params_add
(self, async_client: AsyncAnthropic)
tests/api_resources/beta/organization/federation/rules/test_workspaces.py:276
Methodtest_path_params_add
(self, client: Anthropic)
tests/api_resources/beta/organization/workspaces/test_members.py:209
Methodtest_path_params_add
(self, async_client: AsyncAnthropic)
tests/api_resources/beta/organization/workspaces/test_members.py:458
Methodtest_path_params_add
(self, client: Anthropic)
tests/api_resources/beta/organization/workspaces/test_service_accounts.py:238
Methodtest_path_params_add
(self, async_client: AsyncAnthropic)
tests/api_resources/beta/organization/workspaces/test_service_accounts.py:525
Methodtest_path_params_add
(self, client: Anthropic)
tests/api_resources/beta/organization/rbac_groups/test_members.py:104
Methodtest_path_params_add
(self, async_client: AsyncAnthropic)
tests/api_resources/beta/organization/rbac_groups/test_members.py:247
Methodtest_path_params_add
(self, client: Anthropic)
tests/api_resources/beta/organization/service_accounts/test_workspaces.py:118
Methodtest_path_params_add
(self, async_client: AsyncAnthropic)
tests/api_resources/beta/organization/service_accounts/test_workspaces.py:285
Methodtest_path_params_add
(self, client: Anthropic)
tests/api_resources/organization/federation/rules/test_workspaces.py:104
Methodtest_path_params_add
(self, async_client: AsyncAnthropic)
tests/api_resources/organization/federation/rules/test_workspaces.py:247
Methodtest_path_params_add
(self, client: Anthropic)
tests/api_resources/organization/workspaces/test_members.py:209
Methodtest_path_params_add
(self, async_client: AsyncAnthropic)
tests/api_resources/organization/workspaces/test_members.py:458
Methodtest_path_params_add
(self, client: Anthropic)
tests/api_resources/organization/workspaces/test_service_accounts.py:208
Methodtest_path_params_add
(self, async_client: AsyncAnthropic)
tests/api_resources/organization/workspaces/test_service_accounts.py:456
Methodtest_path_params_add
(self, client: Anthropic)
tests/api_resources/organization/service_accounts/test_workspaces.py:107
Methodtest_path_params_add
(self, async_client: AsyncAnthropic)
tests/api_resources/organization/service_accounts/test_workspaces.py:254
Methodtest_path_params_approve
(self, client: Anthropic)
tests/api_resources/beta/organization/spend_limits/test_increase_requests.py:142
← previousnext →6,301–6,400 of 9,455, ranked by callers