MCPcopy Create free account

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

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

Functiontest_duplicate_has_the_class_and_message_of_the_error
( duplicate: Callable[[AnthropicError], AnthropicError], error: AnthropicError )
tests/test_exceptions.py:58
Functiontest_duplicate_of_a_raised_status_error_keeps_its_attributes
( client: Anthropic, duplicate: Callable[[APIStatusError], APIStatusError] )
tests/test_exceptions.py:68
Methodtest_each_hop_patches_the_original_params_not_the_previous_hop
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:389
Methodtest_each_kind_of_page
(self, call: ResourceList, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:7684
Functiontest_each_request_carries_the_trace_context
(new_client: NewClient, propagator: CountingPropagator)
tests/test_tracing.py:200
Methodtest_each_resource
(self, call: ResourceCall, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:7648
Methodtest_each_resource_failed
(self, call: ResourceCall, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:7670
Functiontest_each_work_item_has_a_span_until_the_next_item
(sync: bool, respx_mock: MockRouter)
tests/lib/environments/test_poller_method.py:619
Functiontest_edit_binary_raises_tool_error
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:584
Functiontest_edit_custom_max_bytes_allows_above_default
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:413
Functiontest_edit_custom_max_bytes_rejects_below_cap
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:404
Functiontest_edit_normal_within_limit
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:396
Functiontest_edit_preserves_crlf_line_endings
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:271
Functiontest_edit_rejects_directory
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:388
Functiontest_edit_rejects_directory_even_when_uncapped
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:428
Functiontest_edit_rejects_oversized_file
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:379
Functiontest_edit_uncapped_allows_oversized
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:421
Functiontest_edit_uniqueness
(tmp_path: Path, description: str, args: dict[str, object], want_error: bool)
tests/lib/tools/test_agent_toolset.py:644
Functiontest_edits_flow_both_ways_and_the_server_wins_conflicts
( tmp_path: Path, caplog: pytest.LogCaptureFixture )
tests/lib/tools/memory_sync/test_memory_sync.py:42
Methodtest_elapsed_of_a_response_whose_body_ends_the_span
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:1619
Functiontest_elsewhere_a_device_named_file_is_an_ordinary_file
(tmp_path: Path, monkeypatch: pytest.MonkeyPatch)
tests/lib/tools/toolsets/test_security.py:227
Methodtest_embedded_resource_image
(self)
tests/lib/tools/test_mcp_tool.py:131
Methodtest_embedded_resource_image_requires_blob
(self)
tests/lib/tools/test_mcp_tool.py:160
Methodtest_embedded_resource_no_mime_defaults_to_text
(self)
tests/lib/tools/test_mcp_tool.py:148
Methodtest_embedded_resource_pdf
(self)
tests/lib/tools/test_mcp_tool.py:123
Methodtest_embedded_resource_pdf_requires_blob
(self)
tests/lib/tools/test_mcp_tool.py:165
Methodtest_embedded_resource_text
(self)
tests/lib/tools/test_mcp_tool.py:116
Methodtest_embedded_resource_unsupported_mime
(self)
tests/lib/tools/test_mcp_tool.py:155
Functiontest_empty
()
tests/test_qs.py:11
Methodtest_empty_access_token_treated_as_missing
(self, clean_env: pytest.MonkeyPatch, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:4812
Functiontest_empty_auth_token_raises
An empty `auth_token` would silently fall back to the parent's `auth_token` via `copy()`'s truthy-or, producing a sub-client with no intention
tests/lib/test_scoped_client.py:67
Methodtest_empty_betas_sends_no_beta_header
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:664
Methodtest_empty_contents_raises
(self)
tests/lib/tools/test_mcp_tool.py:234
Methodtest_empty_contents_raises
(self)
tests/lib/tools/test_mcp_tool.py:280
Methodtest_empty_env_auth_token_is_unset
`ANTHROPIC_AUTH_TOKEN=` (present but empty) must not produce a malformed `Authorization: Bearer ` header.
tests/lib/test_credentials.py:4689
Methodtest_empty_env_credentials_fall_through_to_no_auth
Both env vars empty → same "no auth configured" error as unset, rather than sending an empty `Authorization: Bearer `.
tests/lib/test_credentials.py:4703
Methodtest_empty_identity_token_does_not_beat_active_profile
( self, clean_env: pytest.MonkeyPatch, tmp_path: pathlib.Path )
tests/lib/test_credentials.py:2301
Functiontest_empty_model_is_rejected
( model: str, stream: bool, beta: bool, sync: bool, respx_mock: MockRouter )
tests/lib/test_bedrock.py:321
Methodtest_empty_model_is_rejected
(self, stream: bool, beta: bool, respx_mock: MockRouter)
tests/lib/test_vertex.py:547
Methodtest_empty_model_is_rejected
(self, stream: bool, beta: bool, respx_mock: MockRouter)
tests/lib/test_vertex.py:1078
Methodtest_empty_or_dot_segment_before_semicolon_in_base_url_is_rejected
( self, name: str, value: str, message: str, deferred: bool, r
tests/lib/test_google_cloud.py:198
Methodtest_empty_or_dot_segment_before_semicolon_in_base_url_is_rejected
( self, name: str, value: str, message: str, deferred: bool, r
tests/lib/test_google_cloud.py:1387
Methodtest_empty_or_dot_segment_before_semicolon_in_model_is_rejected
( self, model: str, message: str, stream: bool, beta: bool, respx_mock: MockRouter )
tests/lib/test_vertex.py:531
Methodtest_empty_or_dot_segment_before_semicolon_in_model_is_rejected
( self, model: str, message: str, stream: bool, beta: bool, respx_mock: MockRouter )
tests/lib/test_vertex.py:1061
Methodtest_empty_or_dot_segment_before_semicolon_in_organization_base_url_is_rejected
( self, name: str, value: str, message: str, deferred: bool, r
tests/lib/test_google_cloud.py:222
Methodtest_empty_or_dot_segment_before_semicolon_in_organization_base_url_is_rejected
( self, name: str, value: str, message: str, deferred: bool, r
tests/lib/test_google_cloud.py:1411
Methodtest_empty_or_dot_segment_before_semicolon_in_project_id_or_region_is_rejected
( self, project_id: str, region: str, message: str, beta: bool, respx_mock: MockRouter )
tests/lib/test_vertex.py:468
Methodtest_empty_or_dot_segment_before_semicolon_in_project_id_or_region_is_rejected
( self, project_id: str, region: str, message: str, beta: bool, respx_mock: MockRouter )
tests/lib/test_vertex.py:995
Methodtest_empty_path_raises
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:1558
Methodtest_empty_paths_returns_same_object
(self)
tests/test_files.py:149
Methodtest_empty_pointer_file_is_silent_fallthrough
( self, clean_env: pytest.MonkeyPatch, tmp_path: pathlib.Path )
tests/lib/test_credentials.py:4764
Methodtest_empty_project_id_argument_is_rejected
(self, respx_mock: MockRouter)
tests/lib/test_vertex.py:586
Methodtest_empty_project_id_argument_is_rejected
(self, respx_mock: MockRouter)
tests/lib/test_vertex.py:1119
Methodtest_empty_project_id_environment_variable_is_unset
( self, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/lib/test_vertex.py:614
Methodtest_empty_project_id_environment_variable_is_unset
( self, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/lib/test_vertex.py:1148
Methodtest_empty_project_id_or_region_is_rejected_on_request
( self, name: str, stream: bool, beta: bool, respx_mock: MockRouter )
tests/lib/test_vertex.py:562
Methodtest_empty_project_id_or_region_is_rejected_on_request
( self, name: str, stream: bool, beta: bool, respx_mock: MockRouter )
tests/lib/test_vertex.py:1094
Functiontest_empty_query_params_are_left_unset
(send: Send, caplog: pytest.LogCaptureFixture)
tests/test_prepare.py:503
Methodtest_empty_refresh_token_treated_as_missing
( self, clean_env: pytest.MonkeyPatch, tmp_path: pathlib.Path )
tests/lib/test_credentials.py:4823
Methodtest_empty_region_is_rejected_at_construction
( self, from_env: bool, base_url: str | None, monkeypatch: pytest.MonkeyPatch )
tests/lib/test_vertex.py:603
Methodtest_empty_region_is_rejected_at_construction
( self, from_env: bool, base_url: str | None, monkeypatch: pytest.MonkeyPatch )
tests/lib/test_vertex.py:1136
Methodtest_empty_value_in_base_url_is_rejected
( self, name: str, deferred: bool, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/lib/test_google_cloud.py:244
Methodtest_empty_value_in_base_url_is_rejected
( self, name: str, deferred: bool, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/lib/test_google_cloud.py:1433
Methodtest_empty_value_in_organization_base_url_is_rejected
( self, name: str, project: str, location: str, respx_mock: MockRouter )
tests/lib/test_google_cloud.py:262
Methodtest_empty_value_in_organization_base_url_is_rejected
( self, name: str, project: str, location: str, respx_mock: MockRouter )
tests/lib/test_google_cloud.py:1451
Methodtest_empty_values_are_not_checked_with_explicit_base_url
(self, respx_mock: MockRouter)
tests/lib/test_google_cloud.py:274
Methodtest_empty_values_are_not_checked_with_explicit_base_url
(self, respx_mock: MockRouter)
tests/lib/test_google_cloud.py:1463
Methodtest_enabled_traces_have_spans
( self, traces: Any, sync: bool, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:3871
Functiontest_enabling_an_unimplemented_member_is_a_configuration_error
()
tests/lib/tools/toolsets/test_pipeline.py:461
Functiontest_enabling_file_upload_or_javascript_exec_requires_confirm
()
tests/lib/tools/toolsets/test_confirm.py:74
Functiontest_enabling_javascript_exec_or_file_upload_requires_a_confirm_callable
()
tests/lib/tools/toolsets/test_pipeline.py:487
Functiontest_endless_nesting_is_rejected
(send: Send, monkeypatch: pytest.MonkeyPatch)
tests/test_prepare.py:336
Methodtest_entry_overrides_apply_to_the_hop_request
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:1300
Methodtest_entry_overrides_are_merged_whole_over_the_body
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:328
Functiontest_enum_schema
()
tests/lib/_parse/test_transform.py:66
Functiontest_env_api_key
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws.py:306
Methodtest_env_api_key_alone_does_not_warn
No shadow if there's nothing to shadow — env api_key alone (no auto-discoverable credential signals) is just the normal path.
tests/lib/test_credentials.py:4394
Methodtest_env_api_key_and_auth_token_warn_once_per_process
( self, respx_mock: MockRouter, clean_env: pytest.MonkeyPatch, caplog: pytest.
tests/lib/test_credentials.py:4409
Methodtest_env_api_key_returns_false
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:85
Methodtest_env_api_key_shadows_env_federation_trio_with_warning
Env `ANTHROPIC_API_KEY` + env federation trio → api_key wins (step 2 beats step 4), warn so the user knows WIF is being shadowed.
tests/lib/test_credentials.py:4366
Methodtest_env_api_key_shadows_env_profile_with_warning
( self, clean_env: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture )
tests/lib/test_credentials.py:4383
Functiontest_env_base_url
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws.py:320
Functiontest_env_base_url_does_not_override_derived_url
(respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_google_cloud.py:1161
Functiontest_env_base_url_does_not_override_derived_url_async
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_google_cloud.py:1179
Methodtest_env_federation_beats_active_config_pointer
The profile that `active_config` points at is step 5, like `default`.
tests/lib/test_credentials.py:2287
Methodtest_env_federation_beats_fallback_on_disk_profile
Step 4 (env federation trio) sits above step 5 (fallback on-disk profile) in the precedence spec: a machine with WIF env vars wired up
tests/lib/test_credentials.py:2269
Methodtest_env_federation_beats_profile_in_config_dir_env
`ANTHROPIC_CONFIG_DIR` says where profiles are looked up. It selects none.
tests/lib/test_credentials.py:2314
Methodtest_env_federation_does_not_read_broken_profile_in_config_dir_env
( self, clean_env: pytest.MonkeyPatch, tmp_path: pathlib.Path )
tests/lib/test_credentials.py:2328
Methodtest_env_fills_missing_organization_id
(self, tmp_path: pathlib.Path, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_credentials.py:1463
Methodtest_env_fills_missing_workspace_id
(self, tmp_path: pathlib.Path, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_credentials.py:1505
Methodtest_env_overrides_active_config
(self, tmp_path: pathlib.Path, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_credentials.py:1043
Functiontest_env_region
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws.py:314
Methodtest_env_resolution
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_google_cloud.py:305
Methodtest_env_takes_precedence_over_region
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:398
Methodtest_env_var_base_url_override
Test that ANTHROPIC_VERTEX_BASE_URL environment variable does not override client arg.
tests/lib/test_vertex.py:375
Methodtest_env_var_base_url_override
Test that ANTHROPIC_VERTEX_BASE_URL environment variable does not override client arg.
tests/lib/test_vertex.py:898
Methodtest_env_var_fallback_chain
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:424
Methodtest_env_var_fallback_chain_falls_through
Falls back to second env var when first is not set.
tests/lib/test_aws_auth.py:188
Methodtest_env_var_fallback_chain_falls_through
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:268
Methodtest_env_var_fallback_chain_falls_through
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:352
← previousnext →6,101–6,200 of 12,431, ranked by callers