MCPcopy Create free account

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

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

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:2110
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:1328
Methodtest_sampling_fields_that_the_sdk_does_not_model_have_no_attribute
( self, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:952
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:5028
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:1186
Functiontest_scoped_bearer_client_helper_on_aws
()
tests/lib/test_aws.py:904
Functiontest_scoped_bearer_client_helper_on_aws_async
()
tests/lib/test_aws.py:923
Functiontest_scoped_client_and_its_copy_keep_what_the_parent_read_from_the_environment
( monkeypatch: pytest.MonkeyPatch, )
tests/lib/test_scoped_client.py:307
Functiontest_scoped_sub_client_sends_only_bearer_on_the_wire
Integration-level check: send a real HTTP request through the scoped sub-client (via `httpx2.MockTransport`) and inspect the headers actually
tests/lib/test_scoped_client.py:114
Functiontest_screenshot_media_types_track_the_generated_image_source
()
tests/lib/tools/toolsets/test_surface.py:184
Functiontest_screenshot_renders_one_image_block_as_returned
()
tests/lib/tools/toolsets/test_pipeline.py:164
Methodtest_secret_key_only_raises
(self)
tests/lib/test_aws_auth.py:32
Methodtest_secret_key_only_raises
(self)
tests/lib/test_bedrock_mantle.py:329
Functiontest_secret_not_logged_on_error_paths
Error-path logging (heartbeat shutdown, force-stop failure) must not leak the per-item secret payload or its sessions token.
tests/lib/environments/test_worker.py:431
Methodtest_selects_first_supported
(self)
tests/lib/tools/test_mcp_tool.py:244
Methodtest_semicolon_in_model_is_percent_encoded_in_path
( self, model: str, segment: str, stream: bool, beta: bool, respx_mock: MockRouter )
tests/lib/test_vertex.py:493
Methodtest_semicolon_in_model_is_percent_encoded_in_path
( self, model: str, segment: str, stream: bool, beta: bool, respx_mock: MockRouter )
tests/lib/test_vertex.py:1021
Methodtest_semicolon_in_project_id_and_region_is_kept_beside_one_in_model
( self, stream: bool, beta: bool, respx_mock: MockRouter )
tests/lib/test_vertex.py:511
Methodtest_semicolon_in_project_id_and_region_is_kept_beside_one_in_model
( self, stream: bool, beta: bool, respx_mock: MockRouter )
tests/lib/test_vertex.py:1040
Methodtest_send_after_a_paused_reply_continues_from_it_with_no_messages
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:293
Methodtest_send_after_a_paused_reply_continues_from_it_with_no_messages
(self, respx_mock: MockRouter)
tests/lib/threads/test_async_beta_threads.py:153
Methodtest_send_after_a_resumed_turn_finishes_continues_from_its_last_reply
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:327
Methodtest_send_creates_a_thread_then_continues_it
(self, respx_mock: MockRouter)
tests/lib/threads/test_async_beta_threads.py:87
Methodtest_send_overrides_apply_to_that_turn_only
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:161
Methodtest_send_overrides_take_precedence_over_update
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:1202
Methodtest_send_parse_and_stream_take_the_arguments_of_update
( self, make_client: Callable[[], Anthropic | AsyncAnthropic] )
tests/lib/threads/test_beta_threads.py:1977
Methodtest_send_request_options_replace_the_threads_for_that_turn_only
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:1240
Functiontest_send_retries_past_three_attempts
A tool-result send that keeps failing transiently must keep retrying with backoff (not give up after three attempts while an enclosing worker keep
tests/lib/tools/test_session_runner.py:1778
Functiontest_send_retry_window_update_bounds_send_already_retrying
A send retry window that changes while a send is already retrying bounds that send — `EnvironmentWorker` keeps it equal to the lease TTL each
tests/lib/tools/test_session_runner.py:1831
Methodtest_send_while_another_send_is_in_flight_raises_and_stages_nothing
(self, respx_mock: MockRouter)
tests/lib/threads/test_async_beta_threads.py:366
Methodtest_send_while_streaming_raises_and_stages_nothing
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:1560
Methodtest_send_with_no_messages_after_a_partial_reply_sends_the_turn_again_without_it
( self, respx_mock: MockRouter )
tests/lib/threads/test_beta_threads.py:1713
Methodtest_send_with_no_messages_still_sends_a_partial_turn_again_after_a_call_that_failed
( self, respx_mock: MockRouter )
tests/lib/threads/test_beta_threads.py:1731
Methodtest_send_with_no_messages_still_sends_a_partial_turn_again_after_a_call_that_failed
( self, respx_mock: MockRouter )
tests/lib/threads/test_async_beta_threads.py:883
Methodtest_send_with_nothing_staged_goes_out
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:283
Functiontest_sends_the_error_result_of_a_call_that_failed_while_the_reply_streamed
(setup: SetupFactory)
tests/lib/tools/test_runner_eager_tools.py:364
Methodtest_sends_the_fallback_credit_beta_on_the_original_and_fallback_requests
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:637
Methodtest_sent_in_body_instead_of_header
( self, send: SendMessage, client: AnthropicBedrockMantle, respx_mock: MockRouter )
tests/lib/test_bedrock_mantle.py:693
Functiontest_sequences_sets_views_and_iterators_are_sent_as_lists
(send: Send, make: Callable[[], object])
tests/test_prepare.py:257
Functiontest_serialize_data
(sync: bool)
tests/test_prepare.py:345
Methodtest_server_and_mcp_tool_blocks_are_tool_calls_and_their_responses
( self, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:5079
Methodtest_server_attributes_are_on_the_span_from_its_start_only
( self, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/test_open_telemetry.py:2713
Methodtest_server_port_is_the_base_urls_or_else_the_one_of_its_scheme
( self, client_base_url: str, port: int, sync: bool, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:3185
Methodtest_server_side_fallbacks_raise_an_error
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:548
Methodtest_server_side_fallbacks_raise_an_error
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:642
Methodtest_server_side_tool
( self, snapshot_client: Anthropic, )
tests/lib/tools/test_runners.py:467
Methodtest_server_tool_use
(self, respx_mock: MockRouter)
tests/lib/streaming/test_messages.py:360
Methodtest_server_tool_use
(self, respx_mock: MockRouter)
tests/lib/streaming/test_messages.py:666
Methodtest_server_tool_use
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:518
Methodtest_server_tool_use
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:853
Methodtest_service_account_included
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:1146
Methodtest_session_create_has_its_agent_model_and_environment
( self, raw: bool, agent: Any, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:7484
Methodtest_session_create_sends_an_agent_without_an_id_for_the_api_to_reject
( self, traces: bool, sync: bool, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:7424
Methodtest_session_create_starts_its_span_with_the_agent_and_environment
(self, respx_mock: MockRouter)
tests/test_open_telemetry.py:7501
Functiontest_session_runner_threads_extra_headers_into_stream_list_and_send
A caller-supplied `extra_headers` is threaded, unchanged, into every per-request call the runner makes: the event `stream`, the history `list`
tests/lib/tools/test_session_runner.py:2073
Functiontest_sessions_token_from_secret
The secret payload decodes from URL-safe base64 JSON (with or without padding); anything malformed or token-less resolves to None.
tests/lib/environments/test_worker.py:411
Methodtest_set_messages_params_hands_out_request_params_only
(self)
tests/lib/threads/test_thread_tool_runner.py:195
Methodtest_set_messages_params_leaves_the_tools_of_the_thread_to_a_later_runner
(self, respx_mock: MockRouter)
tests/lib/threads/test_thread_tool_runner.py:176
Methodtest_set_messages_params_leaves_the_tools_of_the_thread_to_a_later_runner
( self, respx_mock: MockRouter )
tests/lib/threads/test_async_beta_threads.py:1406
Methodtest_set_messages_params_with_some_fields_drops_the_others
(self, respx_mock: MockRouter)
tests/lib/threads/test_thread_tool_runner.py:203
Methodtest_set_messages_params_without_tools_still_runs_the_call_the_reply_made
(self, respx_mock: MockRouter)
tests/lib/threads/test_thread_tool_runner.py:254
Functiontest_sets_bearer_auth_token_on_copy
()
tests/lib/test_scoped_client.py:21
Methodtest_shadow_warning_is_one_shot_per_process
The shadow warning is emitted once per shadow-key per process so repeated client construction doesn't spam logs.
tests/lib/test_credentials.py:4728
Methodtest_shared_provider_binds_per_client
The same isolation holds when one provider instance is passed to two clients directly: the first client keeps its binding.
tests/lib/test_credentials.py:2932
Methodtest_short_circuit_skips_http_request
(self, respx_mock: MockRouter)
tests/test_middleware.py:758
Methodtest_short_circuit_skips_http_request
(self, respx_mock: MockRouter)
tests/test_middleware.py:1492
Methodtest_short_token_fully_masked
(self)
tests/lib/test_credentials.py:4797
Functiontest_siblings_are_prepared_in_document_order
(send: Send, monkeypatch: pytest.MonkeyPatch)
tests/test_prepare.py:286
Functiontest_signature_without_evaluating_annotations_tolerates_undefined_names
()
tests/test_utils/test_reflection.py:12
Methodtest_signed_request_without_propagation_keeps_a_valid_signature
( self, sync: bool, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:4326
Functiontest_sigv4_binary_file_upload
(sync: bool, respx_mock: MockRouter)
tests/lib/test_aws.py:536
Methodtest_sigv4_ignores_env
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:241
Methodtest_sigv4_mode_returns_empty_auth_headers
(self)
tests/lib/test_bedrock_mantle.py:243
Functiontest_sigv4_signature
(sync: bool, connection_header: bool)
tests/lib/test_bedrock.py:866
Methodtest_sigv4_signature_does_not_cover_the_trace_headers_that_the_sdk_replaces
( self, sync: bool, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:2873
Methodtest_sigv4_signing_runs_off_event_loop
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_bedrock_mantle.py:361
Functiontest_sigv4_signing_runs_off_event_loop_async
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_bedrock.py:847
Functiontest_sigv4_signing_runs_off_event_loop_async
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws.py:939
Functiontest_sigv4_signs_binary_body
(sync: bool, respx_mock: MockRouter)
tests/lib/test_bedrock.py:708
Functiontest_sigv4_user_profile_id_header
(sync: bool, respx_mock: MockRouter)
tests/lib/test_aws.py:608
Functiontest_sigv4_user_profiles_requests
(sync: bool, respx_mock: MockRouter)
tests/lib/test_aws.py:569
Functiontest_sigv4_with_options_ignores_ambient_first_party_credentials
( sync: bool, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/lib/test_aws.py:678
Methodtest_size_bound_cases
( self, spans: Spans, limit: int, content: dict[str, Any], expected: d
tests/test_open_telemetry.py:6580
Methodtest_size_bound_cases_of_a_tool_span
( self, spans: Spans, limit: int, arguments: dict[str, Any], result: l
tests/lib/tools/test_open_telemetry.py:616
Methodtest_size_bound_counts_a_result_that_is_one_object
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:6060
Methodtest_size_bound_counts_bytes_not_characters
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:6425
← previousnext →9,901–10,000 of 12,274, ranked by callers