MCPcopy Create free account

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

Functions12,431 in github.com/anthropics/anthropic-sdk-python

Functiontest_async_pipeline_parity
()
tests/lib/tools/toolsets/test_pipeline.py:1058
Methodtest_async_raw_response_ends_the_span_with_its_body
( self, spans: Spans, respx_mock: MockRouter, caplog: pytest.LogCaptureFixture )
tests/test_open_telemetry.py:1208
Methodtest_async_raw_response_whose_body_is_not_read_to_the_end_has_no_status
( self, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:1252
Methodtest_async_raw_response_whose_connection_is_lost_in_the_body
( self, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:1602
Methodtest_async_raw_response_whose_events_the_application_reads_itself
( self, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:1547
Methodtest_async_request_body_that_cannot_be_prepared_has_no_span
( self, spans: Spans, tmp_path: pathlib.Path )
tests/test_open_telemetry.py:1016
Functiontest_async_response_basemodel_request_id
(client: Anthropic)
tests/test_response.py:181
Functiontest_async_response_parse_annotated_type
(async_client: AsyncAnthropic)
tests/test_response.py:219
Functiontest_async_response_parse_bool
(client: AsyncAnthropic, content: str, expected: bool)
tests/test_response.py:272
Functiontest_async_response_parse_custom_model
(async_client: AsyncAnthropic)
tests/test_response.py:144
Functiontest_async_response_parse_custom_stream
(async_client: AsyncAnthropic)
tests/test_response.py:109
Functiontest_async_response_parse_expect_model_union_non_json_content
(async_client: AsyncAnthropic)
tests/test_response.py:308
Functiontest_async_response_parse_json_content_type_case_insensitive
(async_client: AsyncAnthropic)
tests/test_response.py:374
Functiontest_async_response_parse_mismatched_basemodel
(async_client: AsyncAnthropic)
tests/test_response.py:77
Functiontest_async_response_parse_pep604_union
(async_client: AsyncAnthropic)
tests/test_response.py:339
Methodtest_async_runner
(self, spans: Spans, respx_mock: MockRouter)
tests/lib/tools/test_open_telemetry.py:1834
Methodtest_async_runners_that_are_open_when_the_event_loop_ends_have_no_status
( self, spans: Spans, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/lib/tools/test_open_telemetry.py:1381
Methodtest_async_sampling_fields_that_the_sdk_does_not_model_have_no_attribute
( self, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:964
Methodtest_async_sent_in_body_instead_of_header
( self, send: AsyncSendMessage, async_client: AsyncAnthropicBedrockMantle, respx_mock: MockRouter
tests/lib/test_bedrock_mantle.py:706
Methodtest_async_session_create_has_its_agent_model_and_environment
( self, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:7525
Methodtest_async_static_token
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:3356
Methodtest_async_stop_sequences
(self, beta: bool, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:6725
Methodtest_async_stop_sequences_alone_over_the_bound_are_removed_whole
( self, over: bool, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:6832
Methodtest_async_stream_and_parse_helpers_have_the_route
( self, beta: bool, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:3118
Methodtest_async_stream_closed_after_message_stop_before_the_end_of_the_body
( self, beta: bool, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:1781
Methodtest_async_stream_closed_before_the_first_read
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:1965
Methodtest_async_stream_ended_after_message_delta_has_what_message_delta_gave
( self, beta: bool, helper: bool, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:2118
Methodtest_async_stream_ended_before_message_delta_has_nothing_that_message_delta_gives
( self, beta: bool, helper: bool, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:2153
Methodtest_async_stream_ended_by_the_server_before_message_stop
( self, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:2221
Methodtest_async_stream_helper_closed_early_has_the_partial_output
( self, beta: bool, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:5817
Methodtest_async_stream_helper_content_comes_from_its_snapshot
( self, beta: bool, spans: Spans, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/test_open_telemetry.py:5659
Methodtest_async_stream_helper_error_event_has_the_partial_output
( self, beta: bool, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:5755
Methodtest_async_stream_helper_stream_ended_by_the_server_has_the_partial_output
( self, beta: bool, events: list[dict[str, Any]], parts: list[dict[str, Any]],
tests/test_open_telemetry.py:5703
Methodtest_async_stream_helper_that_cannot_accumulate_an_event_has_no_output
( self, beta: bool, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:5890
Methodtest_async_stream_helper_without_a_message_start_has_no_output
( self, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:5855
Methodtest_async_stream_over_a_body_that_was_read_before_the_call_returned
( self, spans: Spans, events: list[dict[str, Any]], status: StatusCode, error_type: str | None )
tests/test_open_telemetry.py:1367
Methodtest_async_stream_over_a_body_that_was_read_is_closed_or_read_with_the_helper
(self, spans: Spans)
tests/test_open_telemetry.py:1404
Methodtest_async_stream_over_a_response_that_a_middleware_made_from_bytes
(self, spans: Spans)
tests/test_open_telemetry.py:1450
Methodtest_async_stream_parsed_from_a_raw_response_is_recorded_like_a_stream
( self, spans: Spans, respx_mock: MockRouter, events: list[dict[str, Any]],
tests/test_open_telemetry.py:1312
Methodtest_async_stream_read_without_the_stream_helper
( self, message: dict[str, Any], content_mode: str, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:7827
Methodtest_async_stream_read_without_the_stream_helper_records_everything_but_its_content
( self, beta: bool, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:5930
Methodtest_async_stream_read_without_the_stream_helper_that_ends_early_has_no_output
( self, beta: bool, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:5963
Methodtest_async_stream_whose_bytes_the_application_reads_itself
( self, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:1573
Methodtest_async_stream_without_a_content_block_delta_has_no_time_to_first_chunk
( self, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:1859
Methodtest_async_streamed_compaction_tokens
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:2085
Methodtest_async_streamed_response_model_is_the_one_that_a_fallback_block_names
( self, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:2257
Functiontest_async_supports_anyio_path
()
tests/test_files.py:34
Methodtest_async_tags_the_original_and_fallback_requests
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:734
Methodtest_async_time_to_first_chunk_is_set_at_the_first_content_block_delta
( self, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:1823
Functiontest_async_token_provider_on_sync_client_rejected_clearly
()
tests/lib/test_google_cloud.py:481
Methodtest_async_tool_arguments_alone_over_the_bound_are_removed_whole
( self, city: str, size: int, spans: Spans, respx_mock: MockRouter )
tests/lib/tools/test_open_telemetry.py:701
Functiontest_async_tool_result_parity
(async_navigate: BetaAsyncFunctionTool[Any])
tests/lib/tools/toolsets/test_runnable.py:198
Functiontest_async_tool_result_rejects_block_of_another_family
(toolset_name: str | None)
tests/lib/tools/toolsets/test_runnable.py:259
Methodtest_async_tool_result_without_content_has_an_empty_list
( self, returned: object, spans: Spans, respx_mock: MockRouter )
tests/lib/tools/test_open_telemetry.py:481
Functiontest_async_tool_runner_rejects_a_sync_toolset
(async_client: AsyncAnthropic)
tests/lib/tools/toolsets/test_runner.py:757
Methodtest_async_tool_that_runs_while_the_reply_streams_has_its_span
( self, spans: Spans, respx_mock: MockRouter, city: str )
tests/lib/tools/test_open_telemetry.py:1540
Functiontest_async_tuple_input
()
tests/test_files.py:41
Functiontest_async_unimplemented_members_are_sent_as_disabled_and_implemented_ones_left_to_the_api
()
tests/lib/tools/toolsets/test_interface.py:323
Functiontest_async_unknown_member_name_is_sanitised_in_the_refusal
()
tests/lib/tools/toolsets/test_interface.py:352
Functiontest_async_unnamed_file_tuple_uses_base_name
()
tests/test_files.py:79
Functiontest_async_user_profile_action_urls_are_rejected
(respx_mock: MockRouter)
tests/lib/test_aws.py:663
Methodtest_async_vertex_middleware_sees_canonical_request
(self, respx_mock: MockRouter)
tests/test_middleware.py:2016
Methodtest_async_workload_identity_error_propagates_through_request_flow
Async counterpart of the sync regression test: a WorkloadIdentityError raised by the credential provider must bubble out of the async
tests/lib/test_credentials.py:3523
Methodtest_async_workload_identity_exchange
Async client exchanges the OIDC JWT via the token endpoint and attaches the resulting Bearer token to the request.
tests/lib/test_credentials.py:3365
Methodtest_audio_unsupported
(self)
tests/lib/tools/test_mcp_tool.py:138
Methodtest_auth_explicitly_omitted
(self, client_cls: ClientClass, header: str)
tests/test_header_case_sensitivity.py:252
Methodtest_auth_explicitly_omitted_on_the_client
(self, client_cls: ClientClass)
tests/test_header_case_sensitivity.py:260
Methodtest_auth_supplied_via_custom_headers_env_var
(self, client_cls: ClientClass)
tests/test_header_case_sensitivity.py:242
Methodtest_auth_supplied_via_default_headers
(self, client_cls: ClientClass, headers: Dict[str, str])
tests/test_header_case_sensitivity.py:217
Methodtest_auth_supplied_via_extra_headers
(self, client_cls: ClientClass, headers: Dict[str, str])
tests/test_header_case_sensitivity.py:233
Methodtest_auth_token_returns_static
(self, clean_env: pytest.MonkeyPatch)
tests/lib/test_credentials.py:2150
Methodtest_authorization_default_header_does_not_send_two_credentials
(self, client_cls: ClientClass)
tests/test_header_case_sensitivity.py:108
Methodtest_authorized_user_fresh_token_no_refresh
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:743
Methodtest_authorized_user_refresh_and_writeback
Refresh writes back to credentials/ only — configs/ stays untouched.
tests/lib/test_credentials.py:667
Methodtest_authorized_user_refresh_beta_headers
refresh_token POST must carry oauth-2025-04-20 but NOT oidc-federation-2026-04-01.
tests/lib/test_credentials.py:787
Methodtest_authorized_user_refresh_failure
(self, respx_mock: MockRouter, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:758
Methodtest_authorized_user_refresh_writeback_without_fchmod
( self, respx_mock: MockRouter, tmp_path: pathlib.Path )
tests/lib/test_credentials.py:717
Methodtest_auto_discovered_profile_error_is_silent_fallthrough
( self, clean_env: pytest.MonkeyPatch, tmp_path: pathlib.Path )
tests/lib/test_credentials.py:2351
Methodtest_awaited_on_the_running_loop_and_cached
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:3634
Functiontest_awaits_async_tool_close_hook
()
tests/lib/tools/test_session_runner.py:1348
Functiontest_aws_client_in_api_key_mode_sends_only_the_bearer
`AnthropicAWS.copy()` passes the parent's key back in, so the base `copy()` cannot drop it. The key would then win over the bearer.
tests/lib/test_scoped_client.py:225
Methodtest_aws_creds_use_sigv4_mode
(self)
tests/lib/test_bedrock_mantle.py:227
Functiontest_aws_profile_suppresses_env_api_key
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws.py:349
Methodtest_aws_region_takes_precedence_over_default
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:297
Functiontest_backfill_happens_even_with_caller_authorization
( respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/lib/test_google_cloud.py:815
Functiontest_backoff
(description: str, attempt: int, want: float)
tests/lib/environments/test_poller.py:19
Methodtest_bad_config_json
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:1018
Methodtest_bad_model_surfaces_typed_error
(self, sync_client: AnthropicGoogleCloud)
tests/lib/test_google_cloud_live.py:86
Methodtest_bad_model_surfaces_typed_error
(self, async_client: AsyncAnthropicGoogleCloud)
tests/lib/test_google_cloud_live.py:141
Functiontest_base64_file_input
(send: Send, monkeypatch: pytest.MonkeyPatch)
tests/test_prepare.py:533
Functiontest_base_credential_chain_never_engages
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_google_cloud.py:1196
Functiontest_base_credential_chain_never_engages_async
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_google_cloud.py:1211
Methodtest_base_url_arg_takes_precedence_over_env
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_bedrock_mantle.py:101
Methodtest_base_url_argument_wins
( self, client_class: type[AnthropicFoundry | AsyncAnthropicFoundry], monkeypatch: pytest.MonkeyPatch
tests/lib/test_azure.py:219
Methodtest_base_url_derived
(self)
tests/lib/test_google_cloud.py:1321
Methodtest_base_url_derived_from_project_and_location
(self)
tests/lib/test_google_cloud.py:131
Methodtest_base_url_env
(self)
tests/test_client.py:1135
Methodtest_base_url_env
(self)
tests/test_client.py:2594
Methodtest_base_url_from_config
Config `base_url` is used when no ctor override is given.
tests/lib/test_credentials.py:1061
Methodtest_base_url_no_trailing_slash
(self, client: Anthropic)
tests/test_client.py:1177
← previousnext →5,501–5,600 of 12,431, ranked by callers