MCPcopy Create free account

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

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

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:5137
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:5014
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:5028
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: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: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:5089
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:5148
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:4719
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:4734
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:4691
Methodtest_env_api_key_shadows_env_profile_with_warning
( self, clean_env: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture )
tests/lib/test_credentials.py:4708
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:4720
Functiontest_environment_key_threads_through_to_scoped_client
When an environment key is set, the runner asks `_scoped_client` for a Bearer-only sub-client keyed to that environment. The actual header shape
tests/lib/tools/test_session_runner.py:2034
Methodtest_environment_order
With the sources before `first` unset and every later one set, `first` is sent.
tests/lib/test_credentials.py:4787
Methodtest_environment_variable_disables_spans
(self, registered: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:2424
Methodtest_environment_variable_enables_content
(self, registered: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:5611
Functiontest_environment_worker_accepts_tools_factory
(monkeypatch: pytest.MonkeyPatch)
tests/lib/environments/test_worker.py:313
Functiontest_environment_worker_ends_the_span_ok_when_the_item_is_stopped
(monkeypatch: pytest.MonkeyPatch)
tests/lib/environments/test_worker.py:1295
Functiontest_environment_worker_fails_the_span_of_an_item_that_it_cannot_handle
( monkeypatch: pytest.MonkeyPatch, error: Exception, error_type: str )
tests/lib/environments/test_worker.py:1321
Functiontest_environment_worker_falls_back_when_secret_undecodable
A secret payload that doesn't decode (or carries no sessions token) falls back to the environment key, with a warning that doesn't include the
tests/lib/environments/test_worker.py:384
Functiontest_environment_worker_handles_an_item_in_its_span
(monkeypatch: pytest.MonkeyPatch)
tests/lib/environments/test_worker.py:1266
Functiontest_environment_worker_leaves_the_span_unset_when_it_is_stopped
(monkeypatch: pytest.MonkeyPatch)
tests/lib/environments/test_worker.py:1384
Functiontest_environment_worker_leaves_the_span_unset_when_it_loses_the_lease
( monkeypatch: pytest.MonkeyPatch, heartbeat_error: Exception )
tests/lib/environments/test_worker.py:1343
Functiontest_environment_worker_leaves_the_span_unset_when_losing_the_lease_raises_an_error
( monkeypatch: pytest.MonkeyPatch, )
tests/lib/environments/test_worker.py:1358
Functiontest_environment_worker_prefers_work_item_secret
A claimed item carrying a per-item `secret` payload authenticates that item's heartbeat / force-stop / session-runner calls with the sessions
tests/lib/environments/test_worker.py:340
Functiontest_environment_worker_serves_session
(monkeypatch: pytest.MonkeyPatch)
tests/lib/environments/test_worker.py:242
← previousnext →6,301–6,400 of 12,824, ranked by callers