MCPcopy Create free account

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

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

Methodtest_client_option
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:4362
Methodtest_client_response_validation_error
(self, respx_mock: MockRouter, client: Anthropic)
tests/test_client.py:1269
Methodtest_client_response_validation_error
(self, respx_mock: MockRouter, async_client: AsyncAnthropic)
tests/test_client.py:2735
Methodtest_client_that_sends_a_threads_results_has_the_clients_other_options
( self, environment_key: str | None, spans: Spans, respx_mock: MockRouter )
tests/lib/tools/test_open_telemetry.py:2486
Methodtest_client_timeout_option
(self)
tests/test_client.py:390
Methodtest_client_timeout_option
(self)
tests/test_client.py:1837
Methodtest_client_user_profile_id_is_kept
(self, respx_mock: MockRouter)
tests/lib/test_vertex.py:253
Methodtest_client_user_profile_id_is_kept
(self, respx_mock: MockRouter)
tests/lib/test_vertex.py:774
Functiontest_client_with_an_option_reads_no_env
( new_client: NewClient, option: OpenTelemetryClientOption, resolved: ResolvedOpenTelemetryOptions )
tests/test_tracing.py:331
Functiontest_client_without_an_option_reads_every_env
(new_client: NewClient)
tests/test_tracing.py:312
Functiontest_client_workspace_id_is_kept
(respx_mock: MockRouter)
tests/lib/test_bedrock.py:992
Methodtest_client_workspace_id_is_kept
(self, client: AnthropicBedrockMantle, respx_mock: MockRouter)
tests/lib/test_bedrock_mantle.py:879
Functiontest_client_workspace_id_is_kept_async
(respx_mock: MockRouter)
tests/lib/test_bedrock.py:1016
Functiontest_close_and_with_mark_the_toolset_closed_sync
()
tests/lib/tools/toolsets/test_runner.py:707
Methodtest_close_awaits_aclose
(self)
tests/lib/test_credentials.py:4255
Methodtest_close_awaits_an_async_close
(self)
tests/lib/test_credentials.py:4268
Functiontest_close_from_inside_a_member_does_not_wait_for_itself
()
tests/lib/tools/toolsets/test_pipeline.py:1213
Methodtest_close_reaches_a_partial_wrapped_provider
(self)
tests/lib/test_credentials.py:4291
Methodtest_close_tolerates_hooks_that_return_nothing_to_await
A `Mock` has every attribute, so on Python < 3.12 it looks like it has `aclose()`.
tests/lib/test_credentials.py:4279
Functiontest_close_waits_for_accepted_calls_to_settle
()
tests/lib/tools/toolsets/test_pipeline.py:1176
Functiontest_close_waits_for_the_call_in_flight
()
tests/lib/tools/toolsets/test_computer_pipeline.py:490
Methodtest_closed_stream_has_no_output
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:5978
Methodtest_closing_the_async_runner_ends_the_span_unset
(self, spans: Spans, respx_mock: MockRouter)
tests/lib/tools/test_open_telemetry.py:1136
Methodtest_closing_the_async_runner_from_a_tool_that_runs_while_the_reply_streams_stops_the_loop
( self, spans: Spans, respx_mock: MockRouter, reader: str )
tests/lib/tools/test_open_telemetry.py:1687
Methodtest_closing_the_async_runner_from_a_toolset_member_that_runs_while_the_reply_streams_stops_the_loop
( self, spans: Spans, respx_mock: MockRouter, reader: str )
tests/lib/tools/test_open_telemetry.py:1787
Methodtest_closing_the_async_runner_while_it_works_stops_the_loop
( self, spans: Spans, respx_mock: MockRouter )
tests/lib/tools/test_open_telemetry.py:1155
Methodtest_closing_the_async_streaming_runner_during_a_compaction_closes_its_stream
( self, spans: Spans, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/lib/tools/test_open_telemetry.py:1402
Methodtest_closing_the_async_streaming_runner_from_another_task_ends_its_loop
( self, spans: Spans, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/lib/tools/test_open_telemetry.py:1181
Methodtest_closing_the_async_streaming_runner_twice_at_once_closes_it_once
( self, spans: Spans, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/lib/tools/test_open_telemetry.py:1217
Methodtest_closing_the_runner_ends_the_span_unset
(self, spans: Spans, respx_mock: MockRouter)
tests/lib/tools/test_open_telemetry.py:948
Methodtest_closing_the_runner_from_a_tool_stops_the_loop
(self, spans: Spans, respx_mock: MockRouter)
tests/lib/tools/test_open_telemetry.py:1095
Methodtest_closing_the_runner_from_a_tool_that_runs_while_the_reply_streams_stops_the_loop
( self, spans: Spans, respx_mock: MockRouter, reader: str )
tests/lib/tools/test_open_telemetry.py:1634
Methodtest_closing_the_runner_from_a_toolset_member_that_runs_while_the_reply_streams_stops_the_loop
( self, spans: Spans, respx_mock: MockRouter, reader: str )
tests/lib/tools/test_open_telemetry.py:1738
Methodtest_closing_the_stream_mid_passthrough_tears_down_without_a_fallback_request
( self, respx_mock: MockRouter )
tests/lib/test_refusal_fallback_streaming.py:1321
Methodtest_closing_the_stream_mid_passthrough_tears_down_without_a_fallback_request
( self, respx_mock: MockRouter )
tests/lib/test_refusal_fallback_streaming.py:1881
Functiontest_compact_before_next_turn_again_replaces_the_pending_compaction_sync
(respx_mock: MockRouter)
tests/lib/tools/test_runners.py:2904
Functiontest_compact_before_next_turn_before_the_first_iteration_is_the_first_request_async
( respx_mock: MockRouter, )
tests/lib/tools/test_runners.py:2882
Functiontest_compact_before_next_turn_before_the_first_iteration_is_the_first_request_sync
( respx_mock: MockRouter, )
tests/lib/tools/test_runners.py:2859
Functiontest_compact_before_next_turn_is_refused_beside_a_compaction_edit
()
tests/lib/tools/test_runners.py:3249
Functiontest_compact_before_next_turn_is_sent_after_the_tools_run_async
(respx_mock: MockRouter)
tests/lib/tools/test_runners.py:2662
Functiontest_compact_before_next_turn_is_sent_after_the_tools_run_sync
(respx_mock: MockRouter)
tests/lib/tools/test_runners.py:2590
Functiontest_compact_before_next_turn_on_the_compaction_response_is_ignored_sync
(respx_mock: MockRouter)
tests/lib/tools/test_runners.py:2932
Functiontest_compact_before_next_turn_on_the_final_turn_is_sent_before_stopping_async
( respx_mock: MockRouter, )
tests/lib/tools/test_runners.py:2725
Functiontest_compact_before_next_turn_on_the_final_turn_is_sent_before_stopping_sync
(respx_mock: MockRouter)
tests/lib/tools/test_runners.py:2702
Functiontest_compact_before_next_turn_waits_out_a_paused_turn_async
(respx_mock: MockRouter)
tests/lib/tools/test_runners.py:2831
Functiontest_compact_before_next_turn_waits_out_a_paused_turn_sync
(respx_mock: MockRouter)
tests/lib/tools/test_runners.py:2803
Functiontest_compact_before_next_turn_when_streaming_async
(respx_mock: MockRouter)
tests/lib/tools/test_runners.py:3538
Functiontest_compact_before_next_turn_when_streaming_sync
(respx_mock: MockRouter)
tests/lib/tools/test_runners.py:3510
Methodtest_compaction
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:608
Methodtest_compaction
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:928
Functiontest_compaction_param_is_refused_on_a_tool_runner
()
tests/lib/tools/test_runners.py:3211
Functiontest_compaction_request_leaves_off_reply_params_async
( respx_mock: MockRouter, tool_choice: BetaToolChoiceParam, output_format: Union[Type[_Forecast],
tests/lib/tools/test_runners.py:3404
Functiontest_compaction_request_leaves_off_reply_params_sync
( respx_mock: MockRouter, tool_choice: BetaToolChoiceParam, output_format: Union[Type[_Forecast],
tests/lib/tools/test_runners.py:3367
Functiontest_compaction_resumes_runner_async
(respx_mock: MockRouter)
tests/lib/tools/test_runners.py:850
Functiontest_compaction_resumes_runner_sync
(respx_mock: MockRouter)
tests/lib/tools/test_runners.py:819
Methodtest_compaction_tokens
(self, raw: bool, content_mode: str, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:2003
Methodtest_compaction_tokens_of_a_response_without_usage_of_its_own
( self, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:2019
Functiontest_compaction_without_a_summary_keeps_the_history_and_warns_sync
( respx_mock: MockRouter, caplog: pytest.LogCaptureFixture, content: List[Any], stop_reason: str )
tests/lib/tools/test_runners.py:3058
Functiontest_compat_method_no_error_for_warnings
()
tests/test_models.py:601
Methodtest_completions_not_available
(self)
tests/lib/test_bedrock_mantle.py:184
Methodtest_concurrent_async_calls_get_their_own_spans
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:2387
Methodtest_concurrent_calls_sharing_options_get_their_own_spans
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:2369
Methodtest_concurrent_cold_calls_share_one_provider_call
(self)
tests/lib/test_credentials.py:4162
Functiontest_concurrent_first_construct_waits_for_build
()
tests/test_models.py:1189
Functiontest_concurrent_first_token_resolution_loads_adc_once
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_google_cloud.py:612
Functiontest_concurrent_first_validation_validates_on_every_thread
()
tests/test_models.py:1257
Methodtest_concurrent_invalidate_survives_non_forced_call
An invalidate() that lands during a non-forced call still forces the next call.
tests/lib/test_credentials.py:2044
Methodtest_concurrent_invalidate_survives_non_forced_call
An invalidate() that lands during a non-forced call still forces the next call.
tests/lib/test_credentials.py:4097
Methodtest_concurrent_mandatory_refresh_single_flight
N concurrent callers in the mandatory (expired) window trigger exactly one provider call — waiters block on the leader's event.
tests/lib/test_credentials.py:1782
Methodtest_config_base_url_http_rejected
A config file that specifies base_url=http://evil is rejected so a malicious config can't exfiltrate the assertion or refresh token.
tests/lib/test_credentials.py:857
Methodtest_config_base_url_localhost_http_allowed
Localhost HTTP is allowed for local testing.
tests/lib/test_credentials.py:869
Methodtest_config_dict_base_url_adopted_by_client
Outbound, `config=` path: `Anthropic(config={"base_url": ...})` adopts the dict's `base_url` for API requests when no kwarg/env is set
tests/lib/test_credentials.py:2775
Methodtest_config_dir_env_propagates_error
(self, clean_env: pytest.MonkeyPatch, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:2347
Methodtest_config_dir_env_triggers_tier1
ANTHROPIC_CONFIG_DIR set → the active profile is looked up in that directory.
tests/lib/test_credentials.py:2162
Methodtest_config_file_group_or_other_writable_rejected
(self, tmp_path: pathlib.Path, mode: int)
tests/lib/test_credentials.py:943
Methodtest_config_file_not_writable_by_others_accepted
(self, tmp_path: pathlib.Path, mode: int)
tests/lib/test_credentials.py:952
Methodtest_config_file_symlink_checks_target_mode
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:964
Methodtest_config_file_symlink_outside_config_dir_rejected
( self, tmp_path: pathlib.Path, monkeypatch: pytest.MonkeyPatch )
tests/lib/test_credentials.py:986
Methodtest_config_param_builds_in_memory_federation
`Anthropic(config={...})` accepts a config-file-shaped dict and wires it through to a federation provider, including `workspace_id` as
tests/lib/test_credentials.py:3183
Functiontest_configs_are_gated_on_the_copy_that_is_sent
()
tests/lib/tools/toolsets/test_interface.py:157
Functiontest_configs_is_a_read_only_copy_of_what_to_dict_sends
()
tests/lib/tools/toolsets/test_interface.py:304
Functiontest_configs_is_a_read_only_copy_of_what_to_dict_sends
()
tests/lib/tools/toolsets/test_computer_interface.py:218
Functiontest_confirm_context_describes_the_target_tab_as_of_the_last_block_and_costs_nothing_unread
()
tests/lib/tools/toolsets/test_confirm.py:99
Functiontest_confirm_refusals
()
tests/lib/tools/toolsets/test_refusals.py:114
Functiontest_confirm_sees_every_call_and_a_decline_never_reaches_the_driver
()
tests/lib/tools/toolsets/test_confirm.py:44
Functiontest_confirm_sees_every_call_with_the_member_and_its_parsed_input
()
tests/lib/tools/toolsets/test_computer_pipeline.py:327
Functiontest_confirmation_for_unknown_id_is_ignored
A confirmation for a call this runner has never seen (another client's call, or an `agent.mcp_tool_use` it never dispatches) is recorded but m
tests/lib/tools/test_session_runner.py:988
Functiontest_confirmation_in_history_releases_ask_call
An ask-gated call whose `allow` confirmation is already in history (e.g. it was posted while the runner was disconnected) executes on the reco
tests/lib/tools/test_session_runner.py:772
Methodtest_conflicts_still_raise
( self, client_class: type[AnthropicFoundry | AsyncAnthropicFoundry], monkeypatch: pytest.MonkeyPatch
tests/lib/test_azure.py:230
Methodtest_connection_error
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:1027
Methodtest_consecutive_user_messages_are_sent_as_they_were_appended
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:270
Methodtest_construction_accepts_async_middleware
(self)
tests/test_middleware.py:1880
Methodtest_construction_accepts_sync_middleware
(self)
tests/test_middleware.py:1345
Methodtest_construction_rejects_async_function
(self)
tests/test_middleware.py:1338
Methodtest_construction_rejects_async_only_middleware
(self)
tests/test_middleware.py:1334
Methodtest_construction_rejects_sync_function
(self)
tests/test_middleware.py:1873
Methodtest_construction_rejects_sync_only_middleware
(self)
tests/test_middleware.py:1869
Methodtest_constructor_starts_the_same_thread_as_the_factory
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:1954
Functiontest_content_fetches_fan_out_within_a_store
The first memory's fetch completes only after the second's starts — only parallel fetches satisfy that; serial ones would time out.
tests/lib/tools/memory_sync/test_two_pass.py:78
Methodtest_content_is_off_by_default
(self, spans: Spans, respx_mock: MockRouter)
tests/lib/tools/test_open_telemetry.py:759
← previousnext →5,901–6,000 of 12,824, ranked by callers