MCPcopy Create free account

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

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

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:112
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:228
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:424
Methodtest_selects_first_supported
(self)
tests/lib/tools/test_mcp_tool.py:244
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:1343
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:1396
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:577
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_side_fallbacks_raise_an_error
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:526
Methodtest_server_side_fallbacks_raise_an_error
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:612
Methodtest_server_side_tool
( self, snapshot_client: Anthropic, )
tests/lib/tools/test_runners.py:505
Methodtest_server_tool_use
(self, respx_mock: MockRouter)
tests/lib/streaming/test_messages.py:312
Methodtest_server_tool_use
(self, respx_mock: MockRouter)
tests/lib/streaming/test_messages.py:537
Methodtest_server_tool_use
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:468
Methodtest_server_tool_use
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:734
Methodtest_service_account_included
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:1086
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:1638
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:404
Functiontest_sets_bearer_auth_token_on_copy
()
tests/lib/test_scoped_client.py:18
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:4291
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:2776
Methodtest_short_circuit_skips_http_request
(self, respx_mock: MockRouter)
tests/test_middleware.py:757
Methodtest_short_circuit_skips_http_request
(self, respx_mock: MockRouter)
tests/test_middleware.py:1493
Methodtest_short_token_fully_masked
(self)
tests/lib/test_credentials.py:4360
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
Functiontest_sigv4_binary_file_upload
(sync: bool, respx_mock: MockRouter)
tests/lib/test_aws.py:522
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:190
Methodtest_sigv4_signing_runs_off_event_loop
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_bedrock_mantle.py:258
Functiontest_sigv4_signing_runs_off_event_loop_async
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_bedrock.py:618
Functiontest_sigv4_signing_runs_off_event_loop_async
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws.py:801
Functiontest_sigv4_signs_binary_body
(sync: bool, respx_mock: MockRouter)
tests/lib/test_bedrock.py:480
Functiontest_sigv4_with_options_ignores_ambient_first_party_credentials
( sync: bool, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/lib/test_aws.py:548
Functiontest_skip_auth_async
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws.py:183
Functiontest_skip_auth_base_url_env_overrides_region
(client_cls: _AWSClientClass, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws.py:168
Functiontest_skip_auth_base_url_from_region_arg
(client_cls: _AWSClientClass, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws.py:152
Functiontest_skip_auth_base_url_from_region_env
(client_cls: _AWSClientClass, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws.py:160
Methodtest_skip_auth_derives_url_with_workspace
(self)
tests/lib/test_google_cloud.py:112
Methodtest_skip_auth_derives_url_with_workspace
(self)
tests/lib/test_google_cloud.py:1097
Methodtest_skip_auth_deriving_base_url_requires_project
(self)
tests/lib/test_google_cloud.py:101
Methodtest_skip_auth_deriving_base_url_requires_project
(self)
tests/lib/test_google_cloud.py:1089
Methodtest_skip_auth_deriving_base_url_requires_workspace
(self)
tests/lib/test_google_cloud.py:106
Methodtest_skip_auth_deriving_base_url_requires_workspace
(self)
tests/lib/test_google_cloud.py:1093
Methodtest_skip_auth_does_not_sign_request
(self, get_auth_headers_recorder: GetAuthHeadersRecorder)
tests/lib/test_bedrock_mantle.py:207
Functiontest_skip_auth_explicit_auth_token_on_copy_is_sent
( sync: bool, via: str, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/lib/test_aws.py:253
Functiontest_skip_auth_explicit_base_url_wins
(client_cls: _AWSClientClass, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws.py:176
Methodtest_skip_auth_mutually_exclusive_with_credentials
(self)
tests/lib/test_google_cloud.py:166
Methodtest_skip_auth_mutually_exclusive_with_credentials
(self)
tests/lib/test_google_cloud.py:1072
Functiontest_skip_auth_no_auth_headers
(respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws.py:192
Functiontest_skip_auth_no_workspace_required
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws.py:118
Functiontest_skip_auth_region_request_url
( sync: bool, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/lib/test_aws.py:217
Functiontest_skip_auth_requires_region_or_base_url
(client_cls: _AWSClientClass, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws.py:144
Methodtest_skip_auth_returns_empty_auth_headers
(self)
tests/lib/test_bedrock_mantle.py:198
Functiontest_skip_auth_sends_neither_header
(respx_mock: MockRouter)
tests/lib/test_google_cloud.py:819
Functiontest_skipped_unowned_tool_does_not_trip_idle
A skipped (unanswered) unowned tool_use stays OUT of the end-turn accounting: reconcile sees history ending on an `end_turn` idle but with the
tests/lib/tools/test_session_runner.py:589
Functiontest_skips_already_answered_custom_tool
A custom tool whose `user.custom_tool_result` is already in history (via reconcile) is not re-executed when the same `agent.custom_tool_use` is th
tests/lib/tools/test_session_runner.py:505
Functiontest_skips_already_answered_events
Tool result already in history (via reconcile) should suppress re-execution of the same tool_use seen on the live stream.
tests/lib/tools/test_session_runner.py:402
Functiontest_skips_unowned_builtin_and_custom_tools_by_default
Default split-client behavior: a tool-call event whose name is not in the runner's registry belongs to the other client servicing the session
tests/lib/tools/test_session_runner.py:530
Functiontest_special_new_line_character
( sync: bool, client: Anthropic, async_client: AsyncAnthropic, )
tests/test_streaming.py:169
Methodtest_splices_the_fallback_onto_the_refused_stream
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:224
Methodtest_splices_the_fallback_onto_the_refused_stream
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:1593
Functiontest_stamps_helper_telemetry_header
()
tests/lib/test_scoped_client.py:48
Functiontest_starts_a_toolset_call_once_the_model_has_moved_on_from_it
(setup: SetupFactory, family: str)
tests/lib/tools/test_runner_eager_toolsets.py:82
Functiontest_starts_javascript_exec_like_any_other_call
(setup: SetupFactory)
tests/lib/tools/test_runner_eager_toolsets.py:184
Functiontest_state_changes_are_told_apart_by_their_type
()
tests/lib/tools/toolsets/test_surface.py:134
Functiontest_state_changes_pass_through_and_download_paths_stay_hidden_without_a_file_policy
()
tests/lib/tools/toolsets/test_pipeline.py:204
Functiontest_static_aliases_agree_with_the_derived_tables
()
tests/lib/tools/toolsets/test_computer_registry.py:52
Functiontest_static_aliases_agree_with_the_derived_tables
()
tests/lib/tools/toolsets/test_registry.py:73
Methodtest_static_token_credentials
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:2421
Methodtest_status_error_type_field
(self, respx_mock: MockRouter, client: Anthropic)
tests/test_client.py:1408
Methodtest_status_error_type_field
(self, respx_mock: MockRouter, async_client: AsyncAnthropic)
tests/test_client.py:2743
Functiontest_stores_sync_in_parallel_and_one_failure_spares_the_rest
Stores sync concurrently, and one store's failure never blocks another. The slow store's listing waits for the fast store's listing to start —
tests/lib/tools/memory_sync/test_memory_sync.py:645
Methodtest_str_replace
(self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:206
Methodtest_str_replace
(self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:731
Methodtest_str_replace_error_for_non_existent_file
( self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:280
Methodtest_str_replace_error_for_non_existent_file
( self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:805
Methodtest_str_replace_error_when_string_appears_multiple_times
( self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:256
Methodtest_str_replace_error_when_string_appears_multiple_times
( self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:781
Methodtest_str_replace_error_when_string_not_found
( self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:232
Methodtest_str_replace_error_when_string_not_found
( self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:757
Methodtest_str_replace_preserves_crlf_line_endings
( self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:355
Methodtest_str_replace_preserves_crlf_line_endings
( self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:886
Methodtest_str_variant
(self)
tests/test_utils/test_json.py:20
Methodtest_stream_does_not_warn_for_type
`.stream(output_format=Model)` is silent.
tests/api_resources/beta/test_output_format_conversion.py:107
Functiontest_stream_method_definition_in_sync
(sync: bool)
tests/lib/streaming/test_messages.py:669
Functiontest_stream_method_definition_in_sync
(sync: bool)
tests/lib/streaming/test_beta_messages.py:927
Functiontest_stream_permanent_4xx_ends_iteration
A permanent 4xx on the stream connect must not loop forever — the iterator should exit cleanly.
tests/lib/tools/test_session_runner.py:1557
Functiontest_stream_raises_api_error_for_error_frame
( frame: bytes, error: t.Dict[str, str], sync: bool, respx_mock: MockRouter )
tests/lib/test_bedrock.py:448
Functiontest_stream_rejects_a_schema_dict
(client: Anthropic)
tests/lib/test_output_format_helpers.py:69
Methodtest_stream_rejects_schema_dict
A raw schema dict is no longer accepted by `.stream()`; it belongs in `output_config.format`.
tests/api_resources/beta/test_output_format_conversion.py:61
Functiontest_stream_skips_typeless_chunk
(respx_mock: MockRouter)
tests/lib/test_bedrock.py:393
Functiontest_stream_skips_typeless_chunk_async
(respx_mock: MockRouter)
tests/lib/test_bedrock.py:411
Methodtest_stream_with_raw_schema
Test async messages.stream() with raw JSON schema via output_config.
tests/lib/_parse/test_messages.py:143
Methodtest_stream_with_raw_schema
(self, async_snapshot_client: AsyncAnthropic)
tests/lib/_parse/test_beta_messages.py:20
← previousnext →7,701–7,800 of 9,455, ranked by callers