MCPcopy Create free account

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

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

Methodtest_rename
(self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:480
Methodtest_rename
(self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:1118
Methodtest_rename_error_when_destination_exists
( self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:522
Methodtest_rename_error_when_destination_exists
( self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:1160
Methodtest_rename_error_when_source_not_found
( self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:512
Methodtest_rename_error_when_source_not_found
( self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:1150
Methodtest_rename_not_allow_renaming_memories_directory
( self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool, old_path: str )
tests/lib/tools/memory_tools/test_filesystem.py:541
Methodtest_rename_not_allow_renaming_memories_directory
( self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool, old_path: str )
tests/lib/tools/memory_tools/test_filesystem.py:1179
Methodtest_rename_to_nested_path
(self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:497
Methodtest_rename_to_nested_path
(self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:1135
Methodtest_replay_after_a_continue_sends_system_and_tools_again
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:151
Functiontest_reported_names
(tmp_path: Path, baseline: dict[str, str], tip: dict[str, str], reported: list[str])
tests/test_detect_breaking_changes.py:187
Functiontest_repr
()
tests/test_models.py:198
Functiontest_repr_nested_model
()
tests/test_models.py:204
Methodtest_request_attributes_are_on_the_span_from_its_start
(self, respx_mock: MockRouter)
tests/test_open_telemetry.py:2620
Methodtest_request_body_that_cannot_be_prepared_has_no_span
(self, spans: Spans, tmp_path: pathlib.Path)
tests/test_open_telemetry.py:1007
Methodtest_request_data_prepared_before_prepare_options
( self, respx_mock: MockRouter, client: Anthropic, tmp_path: Path, monkeypatch: pytest.MonkeyPatch
tests/test_client.py:756
Methodtest_request_data_prepared_before_prepare_options
( self, respx_mock: MockRouter, async_client: AsyncAnthropic, tmp_path: Path, monkeypatch: pytest.Monk
tests/test_client.py:2209
Methodtest_request_does_not_modify_the_options_it_is_given
(self, respx_mock: MockRouter, client: Anthropic)
tests/test_client.py:798
Methodtest_request_does_not_modify_the_options_it_is_given
( self, respx_mock: MockRouter, async_client: AsyncAnthropic )
tests/test_client.py:2251
Methodtest_request_extra_headers
(self, client: Anthropic)
tests/test_client.py:822
Methodtest_request_extra_headers
(self, client: Anthropic)
tests/test_client.py:2277
Methodtest_request_extra_headers_httpx_headers
(self, client: Anthropic)
tests/test_client.py:844
Methodtest_request_extra_headers_httpx_headers
(self, async_client: AsyncAnthropic)
tests/test_client.py:2299
Methodtest_request_extra_json
(self, client: Anthropic)
tests/test_client.py:695
Methodtest_request_extra_json
(self, client: Anthropic)
tests/test_client.py:2148
Methodtest_request_extra_json_merged_before_prepare_options
(self, respx_mock: MockRouter)
tests/test_client.py:730
Methodtest_request_extra_json_merged_before_prepare_options
(self, respx_mock: MockRouter)
tests/test_client.py:2183
Methodtest_request_extra_query
(self, client: Anthropic)
tests/test_client.py:926
Methodtest_request_extra_query
(self, client: Anthropic)
tests/test_client.py:2381
Methodtest_request_id_surfaced_on_error
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:1332
Methodtest_request_modifications_do_not_persist_across_attempts
( self, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/test_middleware.py:927
Methodtest_request_mutation_changes_outgoing_request
(self, respx_mock: MockRouter)
tests/test_middleware.py:690
Methodtest_request_mutation_changes_outgoing_request
(self, respx_mock: MockRouter)
tests/test_middleware.py:1448
Methodtest_request_query_spaces
(self, client: Anthropic)
tests/test_client.py:967
Methodtest_request_query_spaces
(self, client: Anthropic)
tests/test_client.py:2422
Methodtest_request_that_sends_a_tools_result_has_the_environment_keys_credentials_alone
( self, spans: Spans, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/lib/tools/test_open_telemetry.py:2458
Methodtest_request_that_sends_a_tools_result_has_the_tools_conversation_id
( self, spans: Spans, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/lib/tools/test_open_telemetry.py:2356
Methodtest_request_timeout
(self, client: Anthropic)
tests/test_client.py:344
Methodtest_request_timeout
(self, async_client: AsyncAnthropic)
tests/test_client.py:1789
Methodtest_request_x_stainless_helper_header_appends
(self, client: Anthropic)
tests/test_client.py:857
Methodtest_request_x_stainless_helper_header_appends
(self, async_client: AsyncAnthropic)
tests/test_client.py:2312
Methodtest_request_x_stainless_helper_header_collapses_case_variants
(self, client: Anthropic)
tests/test_client.py:880
Methodtest_request_x_stainless_helper_header_collapses_case_variants
(self, async_client: AsyncAnthropic)
tests/test_client.py:2335
Methodtest_request_x_stainless_helper_header_dedupes
(self, client: Anthropic)
tests/test_client.py:869
Methodtest_request_x_stainless_helper_header_dedupes
(self, async_client: AsyncAnthropic)
tests/test_client.py:2324
Methodtest_request_x_stainless_helper_header_dedupes_multi_value
(self, client: Anthropic)
tests/test_client.py:895
Methodtest_request_x_stainless_helper_header_dedupes_multi_value
(self, async_client: AsyncAnthropic)
tests/test_client.py:2350
Methodtest_requests
(self, sync: bool, respx_mock: MockRouter)
tests/lib/test_azure.py:358
Methodtest_requests_carry_the_trace_context_by_default
( self, provider: str, sync: bool, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:4148
Functiontest_requires_action_idle_does_not_end_iteration
(in_history: bool)
tests/lib/tools/test_session_runner.py:1274
Methodtest_rereads_on_each_call
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:224
Functiontest_resolvable_profile_cannot_leak
( respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch, profile_config_dir: pathlib.Path )
tests/lib/test_google_cloud.py:1254
Functiontest_resolvable_profile_cannot_leak_async
( respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch, profile_config_dir: pathlib.Path )
tests/lib/test_google_cloud.py:1280
Functiontest_resolve_path
(tmp_path: Path, description: str, p: str, expect_error: bool)
tests/lib/tools/test_agent_toolset.py:49
Functiontest_resolve_path_absolute_inside_workdir
An absolute path that canonicalises inside the workdir is permitted in confined mode — the containment check is what guards the jail, not the
tests/lib/tools/test_agent_toolset.py:64
Functiontest_resolve_path_allowed_roots
A path inside an allowed root resolves; one outside the workdir and every allowed root is refused, and the refusal names no internal options.
tests/lib/tools/test_agent_toolset.py:146
Functiontest_resolve_path_dotdot_is_lexical_before_symlinks
`a/../b` never touches `a`, so a cycle at `a` cannot carry `b` past the containment check on any interpreter.
tests/lib/tools/test_agent_toolset.py:122
Functiontest_resolve_path_rejects_symlink_escape_live_and_dangling
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:137
Functiontest_resolve_path_rejects_symlink_loop
(tmp_path: Path, p: str)
tests/lib/tools/test_agent_toolset.py:109
Functiontest_resolve_path_segment_aware_sibling
A sibling directory sharing a prefix (workdir vs workdir2) must not satisfy the jail.
tests/lib/tools/test_agent_toolset.py:177
Functiontest_resolve_path_symlink_out_of_allowed_root_is_rejected
Symlinks are canonicalised before the containment check, so a link inside an allowed root cannot reach outside it.
tests/lib/tools/test_agent_toolset.py:162
Methodtest_resource_link_unsupported
(self)
tests/lib/tools/test_mcp_tool.py:142
Functiontest_response_basemodel_request_id
(client: Anthropic)
tests/test_response.py:159
Functiontest_response_parse_annotated_type
(client: Anthropic)
tests/test_response.py:202
Functiontest_response_parse_bool
(client: Anthropic, content: str, expected: bool)
tests/test_response.py:247
Functiontest_response_parse_custom_model
(client: Anthropic)
tests/test_response.py:128
Functiontest_response_parse_custom_stream
(client: Anthropic)
tests/test_response.py:94
Functiontest_response_parse_expect_model_union_non_json_content
(client: Anthropic)
tests/test_response.py:291
Functiontest_response_parse_json_content_type_case_insensitive
(client: Anthropic)
tests/test_response.py:354
Functiontest_response_parse_mismatched_basemodel
(client: Anthropic)
tests/test_response.py:59
Functiontest_response_parse_pep604_union
(client: Anthropic)
tests/test_response.py:323
Methodtest_response_wrapper_cast_to_is_returned_unparsed
(self, respx_mock: MockRouter)
tests/test_middleware.py:1117
Methodtest_response_wrapper_cast_to_is_returned_unparsed
(self, respx_mock: MockRouter)
tests/test_middleware.py:1640
Functiontest_result_block_list_types_all_keep_their_fields_or_only_their_type
( blocks: tuple[Any, ...], keep_their_fields: set[str] )
tests/test_open_telemetry.py:8460
Functiontest_result_is_not_posted_when_thread_terminates_while_tool_runs
When a thread terminates while its tool runs, the runner posts no result and yields the call with `posted=False`. The approved call of the same th
tests/lib/tools/test_session_runner.py:1486
Functiontest_result_kinds_and_confirmation_texts
()
tests/lib/tools/toolsets/test_computer_registry.py:63
Functiontest_result_kinds_confirmations_and_default_flags_match_the_published_toolset
()
tests/lib/tools/toolsets/test_registry.py:48
Methodtest_resume_stream_that_ends_before_any_content_keeps_the_paused_reply_resumable
( self, respx_mock: MockRouter )
tests/lib/threads/test_beta_threads.py:359
Methodtest_resume_stream_that_ends_mid_text_keeps_the_paused_reply_resumable
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:1776
Methodtest_resume_that_finds_the_thread_gone_replays_the_history_ending_in_the_paused_reply
( self, respx_mock: MockRouter )
tests/lib/threads/test_beta_threads.py:379
Methodtest_resuming_after_a_break_continues_the_span
(self, spans: Spans, respx_mock: MockRouter)
tests/lib/tools/test_open_telemetry.py:928
Methodtest_resuming_after_an_async_break_continues_the_span
(self, spans: Spans, respx_mock: MockRouter)
tests/lib/tools/test_open_telemetry.py:1119
Functiontest_retries
(respx_mock: MockRouter)
tests/lib/test_aws.py:511
Methodtest_retries_a_refusal_with_the_fallback_params_and_credit_token
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:133
Methodtest_retries_a_refusal_with_the_fallback_params_and_credit_token
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:748
Methodtest_retries_once_on_401_from_token_endpoint
If the provider raises a 401 WorkloadIdentityError, the cache retries once.
tests/lib/test_credentials.py:1728
Methodtest_retries_taken
( self, client: Anthropic, failures_before_success: int, failure_mode: Literal
tests/test_client.py:1366
Methodtest_retries_taken
( self, async_client: AsyncAnthropic, failures_before_success: int, failure_mo
tests/test_client.py:2834
Methodtest_retries_taken_defaults_to_zero_and_copy_preserves_it
(self)
tests/test_middleware.py:432
Methodtest_retry_on_401_still_fails_raises
If both attempts return 401, the second error propagates.
tests/lib/test_credentials.py:1761
Methodtest_retry_with_modified_params_on_request_too_large
(self, respx_mock: MockRouter)
tests/test_middleware.py:735
Methodtest_retryable_error_is_retried_then_propagates
( self, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/test_middleware.py:844
Methodtest_retryable_error_is_retried_then_propagates
( self, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/test_middleware.py:1774
Methodtest_retrying_status_errors_doesnt_leak
( self, respx_mock: MockRouter, client: Anthropic, monkeypatch: pytest.MonkeyPatch )
tests/test_client.py:1343
Methodtest_retrying_status_errors_doesnt_leak
( self, respx_mock: MockRouter, async_client: AsyncAnthropic, monkeypatch: pytest.MonkeyPatch )
tests/test_client.py:2811
Methodtest_retrying_timeout_errors_doesnt_leak
( self, respx_mock: MockRouter, client: Anthropic, monkeypatch: pytest.MonkeyPatch )
tests/test_client.py:1321
Methodtest_retrying_timeout_errors_doesnt_leak
( self, respx_mock: MockRouter, async_client: AsyncAnthropic, monkeypatch: pytest.MonkeyPatch )
tests/test_client.py:2789
Methodtest_returned_error_response_raises_typed_error_for_caller
( self, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/test_middleware.py:901
Functiontest_returns_a_new_snapshot_and_does_not_mutate_the_input
()
tests/lib/sessions/test_accumulate.py:117
← previousnext →9,801–9,900 of 12,431, ranked by callers