MCPcopy Create free account

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

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

Methodtest_raw_response_whose_connection_is_lost_in_the_body
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:1587
Methodtest_raw_response_whose_events_the_application_reads_itself
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:1534
Functiontest_read_binary_custom_media_caps
The media caps are configurable: a small custom cap rejects, a larger/disabled one permits.
tests/lib/tools/test_agent_toolset.py:545
Functiontest_read_binary_honors_explicit_cap
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:527
Functiontest_read_binary_not_subject_to_text_cap
An image over the 256 KiB text default still reads (the API media caps govern).
tests/lib/tools/test_agent_toolset.py:516
Functiontest_read_binary_rejects_over_media_cap
An image whose base64 form would exceed the default per-image cap is rejected up front.
tests/lib/tools/test_agent_toolset.py:535
Functiontest_read_binary_rejects_view_range
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:567
Functiontest_read_binary_returns_content_block
Images/PDFs come back as base64 content blocks, not UnicodeDecodeError.
tests/lib/tools/test_agent_toolset.py:499
Functiontest_read_custom_max_bytes_rejects_below_cap
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:436
Functiontest_read_follows_symlink_chain_inside_workdir
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:1077
Functiontest_read_only_stores_are_never_written
(tmp_path: Path)
tests/lib/tools/memory_sync/test_memory_sync.py:125
Functiontest_read_oversized_file_view_range_wrong_arity_is_rejected
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:297
Functiontest_read_preserves_crlf_line_endings
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:253
Functiontest_read_preserves_lone_cr
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:262
Functiontest_read_rejects_directory
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:371
Functiontest_read_rejects_directory_even_when_uncapped
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:453
Methodtest_read_rejects_file_replaced_with_symlink_before_open
( self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool, monkeypatch: pytest
tests/lib/tools/memory_tools/test_filesystem.py:594
Methodtest_read_rejects_file_replaced_with_symlink_before_open
( self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool, monkeypatch:
tests/lib/tools/memory_tools/test_filesystem.py:1263
Functiontest_read_rejects_oversized_file
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:287
Methodtest_read_rejects_symlink_created_after_validation
( self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool, monkeypatch: pytest
tests/lib/tools/memory_tools/test_filesystem.py:571
Methodtest_read_rejects_symlink_created_after_validation
( self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool, monkeypatch:
tests/lib/tools/memory_tools/test_filesystem.py:1240
Functiontest_read_resolves_dangling_symlink_from_its_real_directory
(tmp_path: Path, rest: str)
tests/lib/tools/test_agent_toolset.py:1068
Functiontest_read_symlink_loop_is_rejected
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:971
Functiontest_read_text_exact_keeps_crlf_and_lone_cr
(tmp_path: Path)
tests/lib/tools/test_files.py:8
Functiontest_read_through_symlink_escape_is_rejected
resolve_path realpaths, so a symlink that escapes the workdir is caught.
tests/lib/tools/test_agent_toolset.py:956
Functiontest_read_uncapped_allows_oversized
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:446
Functiontest_read_undecodable_binary_raises_tool_error
Non-image/PDF binary surfaces a clean ToolError, not a raw UnicodeDecodeError.
tests/lib/tools/test_agent_toolset.py:575
Functiontest_read_under_unreadable_directory_reports_permission_denied
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:1096
Functiontest_read_view_range
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:219
Functiontest_read_view_range_edges
(tmp_path: Path, view_range: list[int], want: str)
tests/lib/tools/test_agent_toolset.py:237
Functiontest_read_view_range_over_cap_crosses_chunk_boundaries
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:362
Functiontest_read_view_range_over_cap_preserves_crlf_line_endings
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:341
Functiontest_read_view_range_over_cap_preserves_lone_cr
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:348
Functiontest_read_view_range_over_cap_rejects_oversized_slice
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:322
Functiontest_read_view_range_over_cap_single_long_line
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:332
Functiontest_read_view_range_streams_file_over_cap
(tmp_path: Path, view_range: list[int], want: str)
tests/lib/tools/test_agent_toolset.py:315
Functiontest_read_view_range_wrong_arity_is_rejected
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:244
Functiontest_read_write_edit_roundtrip
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:204
Methodtest_reads_env
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_credentials.py:213
Methodtest_reads_env_var_path
(self, tmp_path: pathlib.Path, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_credentials.py:233
Methodtest_received_text_for_expected_json
(self, respx_mock: MockRouter)
tests/test_client.py:1246
Methodtest_received_text_for_expected_json
(self, respx_mock: MockRouter)
tests/test_client.py:2697
Functiontest_reconcile_confirmation_releases_call_held_from_live_stream
A confirmation that only ever appears in the reconcile history (its tool_use event is not in the listed window — it was held from the live str
tests/lib/tools/test_session_runner.py:917
Functiontest_reconcile_list_error_does_not_dispatch_partial
If `events.list` errors mid-pagination, the partial `pending` list should not be enqueued — otherwise we'd risk re-running a tool whose result
tests/lib/tools/test_session_runner.py:2005
Functiontest_reconcile_released_call_not_cut_short_by_idle
A held call released by the reconcile pass (its allow verdict only shows up in history after a reconnect) is in-flight work: even if that history
tests/lib/tools/test_session_runner.py:1192
Functiontest_reconnect_does_not_double_dispatch_held_call
A call held on the live stream whose `allow` confirmation shows up in the reconcile history after a reconnect is dispatched exactly once: the
tests/lib/tools/test_session_runner.py:882
Functiontest_recursive_proxy
()
tests/test_utils/test_proxy.py:17
Methodtest_reentering_the_same_state_nests
(self)
tests/lib/test_refusal_fallback.py:1038
Functiontest_ref_schema
()
tests/lib/_parse/test_transform.py:12
Functiontest_ref_schema_with_defs
()
tests/lib/_parse/test_transform.py:18
Methodtest_refresh_failure_does_not_retain_refresh_token
( self, respx_mock: MockRouter, clean_env: pytest.MonkeyPatch, tmp_path: pathlib.Path )
tests/lib/test_credentials.py:4975
Methodtest_refresh_invalid_expires_does_not_retain_new_token
( self, respx_mock: MockRouter, clean_env: pytest.MonkeyPatch, tmp_path: pathlib.Path, expires_in: str
tests/lib/test_credentials.py:4986
Methodtest_refresh_json_array_response_raises_redacted_error
A JSON-but-non-object refresh body (which can echo the request's refresh token) is rejected at the wrap boundary and never bound to a
tests/lib/test_credentials.py:5016
Methodtest_refresh_non_json_response_raises_redacted_error
A non-JSON refresh response raises WorkloadIdentityError (it previously escaped as a raw json ValueError whose `.doc` carries the full
tests/lib/test_credentials.py:5000
Methodtest_refresh_success_writes_raw_tokens_to_disk_and_wire
SecretStr wrapping is an in-memory concern only: the refresh POST body and the persisted credentials file must carry the raw values —
tests/lib/test_credentials.py:5045
Functiontest_refresh_without_google_auth_raises_actionable_error
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_vertex.py:661
Functiontest_refresh_without_google_auth_raises_actionable_error
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_google_cloud.py:537
Methodtest_refusal_after_a_completed_server_tool
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:1351
Functiontest_refusal_ends_runner_without_executing_tools_async
(respx_mock: MockRouter)
tests/lib/tools/test_runners.py:618
Functiontest_refusal_ends_runner_without_executing_tools_sync
(respx_mock: MockRouter)
tests/lib/tools/test_runners.py:581
Methodtest_refusal_stop_details_propagated
(self, respx_mock: MockRouter)
tests/lib/streaming/test_messages.py:435
Methodtest_refusal_stop_details_propagated
(self, respx_mock: MockRouter)
tests/lib/streaming/test_messages.py:709
Methodtest_refusal_stop_details_propagated
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:574
Methodtest_refusal_stop_details_propagated
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:892
Methodtest_refusal_with_no_credit_token_passes_a_through_and_logs_an_error
( self, respx_mock: MockRouter, caplog: pytest.LogCaptureFixture )
tests/lib/test_refusal_fallback_streaming.py:427
Functiontest_refusals_before_dispatch_read_as_tool_errors_and_never_reach_the_driver
()
tests/lib/tools/toolsets/test_pipeline.py:313
Functiontest_region_constructor_overrides_env
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws.py:365
Methodtest_region_from_aws_default_region_env_var
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_bedrock_mantle.py:168
Methodtest_region_from_aws_region_env_var
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_bedrock_mantle.py:160
Functiontest_region_from_constructor
()
tests/lib/test_aws.py:359
Functiontest_region_infer_from_aws_profile_argument
( mock_aws_config: None, # noqa: ARG001 monkeypatch: t.Any, )
tests/lib/test_bedrock.py:516
Functiontest_region_infer_from_profile
( mock_aws_config: None, # noqa: ARG001 profiles: t.List[AwsConfigProfile], )
tests/lib/test_bedrock.py:481
Functiontest_region_infer_from_specified_profile
( mock_aws_config: None, # noqa: ARG001 profiles: t.List[AwsConfigProfile], aws_profile: str,
tests/lib/test_bedrock.py:500
Functiontest_region_is_required
( mock_aws_config: None, # noqa: ARG001 monkeypatch: t.Any, )
tests/lib/test_bedrock.py:527
Methodtest_regional_base_url
Test that regional endpoints use the correct base URL format.
tests/lib/test_vertex.py:369
Methodtest_regional_base_url
Test that regional endpoints use the correct base URL format.
tests/lib/test_vertex.py:889
Methodtest_reinvokes_identity_provider
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:1286
Methodtest_rejected_previous_message_id_replays_the_full_history_under_a_new_thread
( self, respx_mock: MockRouter, caplog: pytest.LogCaptureFixture, rejection: httpx2.Response, reason:
tests/lib/threads/test_beta_threads.py:406
Methodtest_rejected_previous_message_id_replays_the_full_history_under_a_new_thread
( self, respx_mock: MockRouter )
tests/lib/threads/test_async_beta_threads.py:167
Methodtest_rejects_both_output_format_and_config
(self, async_client: AsyncAnthropic)
tests/lib/_parse/test_beta_messages.py:105
Functiontest_remove_tools_refuses_a_toolset_and_queues_nothing
( respx_mock: MockRouter, client: Anthropic, async_client: AsyncAnthropic, flavour: str, removed: str )
tests/lib/tools/toolsets/test_browser_runner.py:212
Functiontest_remove_tools_removes_a_function_tool_named_like_a_member
( respx_mock: MockRouter, client: Anthropic, async_client: AsyncAnthropic, flavour: str )
tests/lib/tools/toolsets/test_browser_runner.py:312
Functiontest_remove_tools_stops_a_call_already_in_the_turn
( sync: bool, remove_by: str, client: Anthropic, async_client: AsyncAnthropic, respx_mock: MockRouter )
tests/lib/tools/test_runners.py:1775
Functiontest_remove_tools_with_a_member_name_removes_only_the_function_tool_of_that_name
( respx_mock: MockRouter, client: Anthropic, async_client: AsyncAnthropic, flavour: str )
tests/lib/tools/toolsets/test_browser_runner.py:338
Functiontest_removes_files_from_input
()
tests/test_extract_files.py:11
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
← previousnext →9,601–9,700 of 12,274, ranked by callers