MCPcopy Create free account

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

Functions14,068 in github.com/anthropics/anthropic-sdk-python

Functiontest_edit_uncapped_allows_oversized
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:434
Functiontest_edit_uniqueness
(tmp_path: Path, description: str, args: dict[str, object], want_error: bool)
tests/lib/tools/test_agent_toolset.py:702
Functiontest_edit_writes_a_result_the_cap_allows
( tmp_path: Path, max_file_bytes: int | None, seed: str, new_string: str, replace_all: bool, want: str )
tests/lib/tools/test_agent_toolset.py:472
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:1620
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:5293
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:5170
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:5184
Functiontest_empty_environment_key_is_rejected_when_the_runner_is_built
(async_client: AsyncAnthropic)
tests/lib/tools/test_session_runner.py:2178
Methodtest_empty_identity_token_does_not_beat_active_profile
( self, clean_env: pytest.MonkeyPatch, tmp_path: pathlib.Path )
tests/lib/test_credentials.py:2306
Functiontest_empty_model_is_rejected
( model: str, stream: bool, beta: bool, sync: bool, respx_mock: MockRouter )
tests/lib/test_bedrock.py:322
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_output_is_recorded_as_the_text_that_is_sent
(self, spans: Spans, output: object)
tests/lib/tools/test_open_telemetry.py:2228
Methodtest_empty_path_raises
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:1563
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:5245
Functiontest_empty_poll_is_repeated_after_1_to_3_seconds
(sync: bool, jitter: float, times: list[float])
tests/lib/environments/test_poller.py:48
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:5304
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:3872
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:112
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:4875
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:4890
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:4847
Methodtest_env_api_key_shadows_env_profile_with_warning
( self, clean_env: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture )
tests/lib/test_credentials.py:4864
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:2292
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:2274
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:2319
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:2333
Methodtest_env_fills_missing_organization_id
(self, tmp_path: pathlib.Path, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_credentials.py:1468
Methodtest_env_fills_missing_workspace_id
(self, tmp_path: pathlib.Path, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_credentials.py:1510
Methodtest_env_overrides_active_config
(self, tmp_path: pathlib.Path, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_credentials.py:1048
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
Methodtest_env_var_fallback_chain_first_wins
First env var in the chain takes priority.
tests/lib/test_aws_auth.py:173
Methodtest_env_var_fallback_chain_first_wins
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:256
Methodtest_env_var_fallback_chain_first_wins
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:341
Methodtest_env_var_fallback_chain_none_set
Defaults to SigV4 when no env vars in the chain are set.
tests/lib/test_aws_auth.py:203
Methodtest_env_var_fallback_chain_none_set
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:363
Methodtest_env_workspace_id_fills_user_oauth
`ANTHROPIC_WORKSPACE_ID` fills `workspace_id` uniformly across profile types — not just federation. This pins the precedence model: ct
tests/lib/test_credentials.py:1529
Methodtest_environment_is_read_when_the_client_is_constructed
( self, sync: bool, registered: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:4721
Methodtest_environment_order
With the sources before `first` unset and every later one set, `first` is sent.
tests/lib/test_credentials.py:4943
Methodtest_environment_variable_disables_spans
(self, registered: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:2425
Methodtest_environment_variable_enables_content
(self, registered: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:5612
Methodtest_error_message_names_the_host_that_a_redirect_led_to
( self, client: Anthropic, error: Exception, message: str )
tests/test_client.py:1672
Methodtest_error_message_names_the_host_that_a_redirect_led_to
( self, async_client: AsyncAnthropic, error: Exception, message: str )
tests/test_client.py:3475
← previousnext →6,901–7,000 of 14,068, ranked by callers