MCPcopy Create free account

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

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

Methodtest_request_extra_json
(self, client: Anthropic)
tests/test_client.py:2185
Methodtest_request_extra_json_merged_before_prepare_options
(self, respx_mock: MockRouter)
tests/test_client.py:767
Methodtest_request_extra_json_merged_before_prepare_options
(self, respx_mock: MockRouter)
tests/test_client.py:2220
Methodtest_request_extra_query
(self, client: Anthropic)
tests/test_client.py:963
Methodtest_request_extra_query
(self, client: Anthropic)
tests/test_client.py:2418
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:1004
Methodtest_request_query_spaces
(self, client: Anthropic)
tests/test_client.py:2459
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:381
Methodtest_request_timeout
(self, async_client: AsyncAnthropic)
tests/test_client.py:1826
Methodtest_request_x_stainless_helper_header_appends
(self, client: Anthropic)
tests/test_client.py:894
Methodtest_request_x_stainless_helper_header_appends
(self, async_client: AsyncAnthropic)
tests/test_client.py:2349
Methodtest_request_x_stainless_helper_header_collapses_case_variants
(self, client: Anthropic)
tests/test_client.py:917
Methodtest_request_x_stainless_helper_header_collapses_case_variants
(self, async_client: AsyncAnthropic)
tests/test_client.py:2372
Methodtest_request_x_stainless_helper_header_dedupes
(self, client: Anthropic)
tests/test_client.py:906
Methodtest_request_x_stainless_helper_header_dedupes
(self, async_client: AsyncAnthropic)
tests/test_client.py:2361
Methodtest_request_x_stainless_helper_header_dedupes_multi_value
(self, client: Anthropic)
tests/test_client.py:932
Methodtest_request_x_stainless_helper_header_dedupes_multi_value
(self, async_client: AsyncAnthropic)
tests/test_client.py:2387
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:1403
Methodtest_retries_taken
( self, async_client: AsyncAnthropic, failures_before_success: int, failure_mo
tests/test_client.py:2871
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:1380
Methodtest_retrying_status_errors_doesnt_leak
( self, respx_mock: MockRouter, async_client: AsyncAnthropic, monkeypatch: pytest.MonkeyPatch )
tests/test_client.py:2848
Methodtest_retrying_timeout_errors_doesnt_leak
( self, respx_mock: MockRouter, client: Anthropic, monkeypatch: pytest.MonkeyPatch )
tests/test_client.py:1358
Methodtest_retrying_timeout_errors_doesnt_leak
( self, respx_mock: MockRouter, async_client: AsyncAnthropic, monkeypatch: pytest.MonkeyPatch )
tests/test_client.py:2826
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
Methodtest_returns_arg_when_provided
(self)
tests/lib/test_aws_auth.py:223
Methodtest_returns_arg_when_provided
(self)
tests/lib/test_aws_auth.py:285
Methodtest_returns_arg_when_provided
(self)
tests/lib/test_aws_auth.py:316
Methodtest_returns_arg_when_provided
(self)
tests/lib/test_aws_auth.py:379
Methodtest_returns_authorization_and_date_headers
(self)
tests/lib/test_aws_auth.py:473
Methodtest_returns_aws_default_region_env
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:292
Methodtest_returns_aws_region_env
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:288
Methodtest_returns_env_when_no_arg
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:319
Methodtest_returns_env_when_no_arg
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:382
Methodtest_returns_env_when_not_sigv4
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:229
Methodtest_returns_none_for_sigv4
(self)
tests/lib/test_aws_auth.py:226
Methodtest_returns_none_when_no_source
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:306
Methodtest_returns_none_when_no_source
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:323
Methodtest_returns_none_when_no_source
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:390
Methodtest_returns_none_when_not_sigv4_and_no_env
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:233
Methodtest_returns_the_final_refusal_once_the_chain_is_exhausted
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:315
Methodtest_returns_token
(self)
tests/lib/test_credentials.py:206
Functiontest_run_requires_environment_id_and_environment_key
()
tests/lib/environments/test_worker.py:610
Methodtest_runner_adds_and_removes_tools_on_the_thread
(self, respx_mock: MockRouter)
tests/lib/threads/test_tool_runner_threading.py:87
Methodtest_runner_adds_and_removes_tools_on_the_thread
(self, respx_mock: MockRouter)
tests/lib/threads/test_async_beta_threads.py:968
Methodtest_runner_adds_no_result_for_a_call_the_caller_leaves_unanswered
( self, respx_mock: MockRouter, mode: dict[str, Any] )
tests/lib/threads/test_tool_runner_threading.py:392
Methodtest_runner_adds_tool_results_ahead_of_messages_appended_to_the_thread_mid_loop
( self, respx_mock: MockRouter, respond: Any, stream: bool )
tests/lib/threads/test_thread_tool_runner.py:437
Methodtest_runner_adds_tool_results_ahead_of_messages_appended_to_the_thread_mid_loop
( self, respx_mock: MockRouter )
tests/lib/threads/test_async_beta_threads.py:1303
Methodtest_runner_compacts_a_thread_that_ends_in_a_partial_reply_without_that_reply
( self, respx_mock: MockRouter, ending: str )
tests/lib/threads/test_thread_tool_runner.py:379
Methodtest_runner_compacts_a_thread_that_ends_in_a_partial_reply_without_that_reply
( self, respx_mock: MockRouter, ending: str )
tests/lib/threads/test_async_beta_threads.py:1770
← previousnext →10,101–10,200 of 12,795, ranked by callers