MCPcopy Create free account

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

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

Methodtest_request_extra_query
(self, client: Anthropic)
tests/test_client.py:817
Methodtest_request_extra_query
(self, client: Anthropic)
tests/test_client.py:2118
Methodtest_request_id_surfaced_on_error
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:1272
Methodtest_request_modifications_do_not_persist_across_attempts
( self, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/test_middleware.py:926
Methodtest_request_mutation_changes_outgoing_request
(self, respx_mock: MockRouter)
tests/test_middleware.py:689
Methodtest_request_mutation_changes_outgoing_request
(self, respx_mock: MockRouter)
tests/test_middleware.py:1449
Methodtest_request_timeout
(self, client: Anthropic)
tests/test_client.py:328
Methodtest_request_timeout
(self, async_client: AsyncAnthropic)
tests/test_client.py:1621
Methodtest_request_x_stainless_helper_header_appends
(self, client: Anthropic)
tests/test_client.py:748
Methodtest_request_x_stainless_helper_header_appends
(self, async_client: AsyncAnthropic)
tests/test_client.py:2049
Methodtest_request_x_stainless_helper_header_collapses_case_variants
(self, client: Anthropic)
tests/test_client.py:771
Methodtest_request_x_stainless_helper_header_collapses_case_variants
(self, async_client: AsyncAnthropic)
tests/test_client.py:2072
Methodtest_request_x_stainless_helper_header_dedupes
(self, client: Anthropic)
tests/test_client.py:760
Methodtest_request_x_stainless_helper_header_dedupes
(self, async_client: AsyncAnthropic)
tests/test_client.py:2061
Methodtest_request_x_stainless_helper_header_dedupes_multi_value
(self, client: Anthropic)
tests/test_client.py:786
Methodtest_request_x_stainless_helper_header_dedupes_multi_value
(self, async_client: AsyncAnthropic)
tests/test_client.py:2087
Functiontest_requires_action_idle_does_not_end_iteration
(in_history: bool)
tests/lib/tools/test_session_runner.py:1248
Methodtest_rereads_on_each_call
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:217
Functiontest_resolvable_profile_cannot_leak
( respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch, profile_config_dir: pathlib.Path )
tests/lib/test_google_cloud.py:1009
Functiontest_resolvable_profile_cannot_leak_async
( respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch, profile_config_dir: pathlib.Path )
tests/lib/test_google_cloud.py:1035
Functiontest_resolve_path
(tmp_path: Path, description: str, p: str, expect_error: bool)
tests/lib/tools/test_agent_toolset.py:46
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:61
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:143
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:119
Functiontest_resolve_path_rejects_symlink_escape_live_and_dangling
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:134
Functiontest_resolve_path_rejects_symlink_loop
(tmp_path: Path, p: str)
tests/lib/tools/test_agent_toolset.py:106
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:174
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:159
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:1116
Methodtest_response_wrapper_cast_to_is_returned_unparsed
(self, respx_mock: MockRouter)
tests/test_middleware.py:1641
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
Functiontest_retries
(respx_mock: MockRouter)
tests/lib/test_aws.py:497
Methodtest_retries_a_refusal_with_the_fallback_params_and_credit_token
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:111
Methodtest_retries_a_refusal_with_the_fallback_params_and_credit_token
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:688
Methodtest_retries_once_on_401_from_token_endpoint
If the provider raises a 401 WorkloadIdentityError, the cache retries once.
tests/lib/test_credentials.py:1668
Methodtest_retries_taken
( self, client: Anthropic, failures_before_success: int, failure_mode: Literal
tests/test_client.py:1236
Methodtest_retries_taken
( self, async_client: AsyncAnthropic, failures_before_success: int, failure_mo
tests/test_client.py:2550
Methodtest_retries_taken_defaults_to_zero_and_copy_preserves_it
(self)
tests/test_middleware.py:431
Methodtest_retry_on_401_still_fails_raises
If both attempts return 401, the second error propagates.
tests/lib/test_credentials.py:1701
Methodtest_retry_with_modified_params_on_request_too_large
(self, respx_mock: MockRouter)
tests/test_middleware.py:734
Methodtest_retryable_error_is_retried_then_propagates
( self, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/test_middleware.py:843
Methodtest_retryable_error_is_retried_then_propagates
( self, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/test_middleware.py:1777
Methodtest_retrying_status_errors_doesnt_leak
( self, respx_mock: MockRouter, client: Anthropic, monkeypatch: pytest.MonkeyPatch )
tests/test_client.py:1213
Methodtest_retrying_status_errors_doesnt_leak
( self, respx_mock: MockRouter, async_client: AsyncAnthropic, monkeypatch: pytest.MonkeyPatch )
tests/test_client.py:2527
Methodtest_retrying_timeout_errors_doesnt_leak
( self, respx_mock: MockRouter, client: Anthropic, monkeypatch: pytest.MonkeyPatch )
tests/test_client.py:1191
Methodtest_retrying_timeout_errors_doesnt_leak
( self, respx_mock: MockRouter, async_client: AsyncAnthropic, monkeypatch: pytest.MonkeyPatch )
tests/test_client.py:2505
Methodtest_returned_error_response_raises_typed_error_for_caller
( self, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/test_middleware.py:900
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:293
Methodtest_returns_token
(self)
tests/lib/test_credentials.py:199
Functiontest_run_requires_environment_id_and_environment_key
()
tests/lib/environments/test_worker.py:603
Functiontest_runner_passes_context_and_leaves_the_toolset_open_async
( async_client: AsyncAnthropic, respx_mock: MockRouter )
tests/lib/tools/toolsets/test_runner.py:665
Functiontest_runner_passes_the_tool_use_as_context_and_leaves_the_toolset_open_sync
( client: Anthropic, respx_mock: MockRouter )
tests/lib/tools/toolsets/test_runner.py:634
Functiontest_runner_sends_no_beta_header_when_given_no_betas
( sync: bool, client: Anthropic, async_client: AsyncAnthropic, respx_mock: MockRouter )
tests/lib/tools/test_runners.py:3404
Functiontest_runs_a_held_call_when_the_caller_asks_for_the_tool_response
(setup: SetupFactory)
tests/lib/tools/test_runner_eager_tools.py:554
Functiontest_runs_context_manager_tool_cleanup_on_exit
A tool defined as an `@asynccontextmanager` via `@beta_async_tool` has its `__aexit__` driven by the runner cleanup path, additively to the le
tests/lib/tools/test_session_runner.py:1675
Functiontest_runs_each_call_once
(setup: SetupFactory)
tests/lib/tools/test_runner_eager_tools.py:143
Functiontest_runs_each_tool_once_the_model_has_moved_on_from_its_call
(setup: SetupFactory)
tests/lib/tools/test_runner_eager_tools.py:47
Functiontest_runs_every_tool_after_the_loop_body_when_not_streaming_as_before
(setup: SetupFactory)
tests/lib/tools/test_runner_eager_tools.py:73
Functiontest_runs_no_call_once_reading_the_reply_has_failed
(setup: SetupFactory)
tests/lib/tools/test_runner_eager_tools.py:335
Functiontest_runs_no_later_call_of_a_toolset_once_one_of_its_calls_has_failed
(setup: SetupFactory)
tests/lib/tools/test_runner_eager_toolsets.py:372
Functiontest_runs_no_later_call_once_the_caller_leaves_the_loop
(setup: SetupFactory)
tests/lib/tools/test_runner_eager_tools.py:701
Functiontest_runs_the_calls_after_a_fallback_block_once_the_loop_body_ends_in_order
(setup: SetupFactory)
tests/lib/tools/test_runner_eager_tools.py:684
Functiontest_runs_the_calls_after_the_loop_body_when_the_caller_does_not_read_the_stream
( setup: SetupFactory, )
tests/lib/tools/test_runner_eager_tools.py:279
Functiontest_runs_the_calls_one_at_a_time
(setup: SetupFactory)
tests/lib/tools/test_runner_eager_tools.py:351
Functiontest_runs_the_calls_while_the_caller_reads_the_stream_however_it_reads_it
( setup: SetupFactory, read: str )
tests/lib/tools/test_runner_eager_tools.py:258
Functiontest_runs_the_remaining_calls_after_the_loop_body_when_the_caller_stops_reading_early
( setup: SetupFactory, )
tests/lib/tools/test_runner_eager_tools.py:290
Functiontest_runs_tool_close_hook_on_exit
The runner calls each tool's optional `close` cleanup hook when the iteration ends, regardless of cause.
tests/lib/tools/test_session_runner.py:1302
Methodtest_scalar_credentials_file_does_not_retain_token
A credentials file whose top level is a JSON string (e.g. a bare token pasted into the file) must raise a clean error without the valu
tests/lib/test_credentials.py:4591
Functiontest_scalar_subclasses_are_sent_as_their_value
(send: Send)
tests/test_prepare.py:310
Functiontest_scalars
(send: Send)
tests/test_prepare.py:304
Methodtest_scope_is_display_only
`scope` is stored on the provider for parity but never sent on the wire — the server derives effective scope from the federation rule.
tests/lib/test_credentials.py:1126
Functiontest_scoped_bearer_client_helper_on_aws
()
tests/lib/test_aws.py:766
Functiontest_scoped_bearer_client_helper_on_aws_async
()
tests/lib/test_aws.py:785
← previousnext →7,601–7,700 of 9,455, ranked by callers