MCPcopy Create free account

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

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

Functiontest_expired_credentials_refreshed
(respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_google_cloud.py:514
Methodtest_expired_is_mandatory
(self)
tests/lib/test_credentials.py:1709
Functiontest_explicit_aws_creds_suppress_env_api_key
Explicit SigV4 constructor args should suppress ANTHROPIC_AWS_API_KEY env var.
tests/lib/test_aws.py:336
Methodtest_explicit_base_url_needs_no_location
(self)
tests/lib/test_google_cloud.py:126
Methodtest_explicit_base_url_needs_no_workspace
(self)
tests/lib/test_google_cloud.py:345
Methodtest_explicit_base_url_needs_no_workspace
(self)
tests/lib/test_google_cloud.py:1307
Methodtest_explicit_base_url_takes_every_route
(self, respx_mock: MockRouter)
tests/lib/test_google_cloud.py:1594
Methodtest_explicit_base_url_takes_every_route
(self, respx_mock: MockRouter)
tests/lib/test_google_cloud.py:1753
Methodtest_explicit_config_beats_env_api_key
Explicit `config=` is step 1 and beats env `ANTHROPIC_API_KEY` (step 2). The env api_key is ignored entirely and the config-derived cr
tests/lib/test_credentials.py:3055
Methodtest_explicit_config_beats_env_api_key
Explicit `config=` is also step 1 and beats env api_key.
tests/lib/test_credentials.py:4300
Functiontest_explicit_credential_suppresses_adc
( respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch, kwarg: dict[str, Any] )
tests/lib/test_google_cloud.py:570
Functiontest_explicit_credential_suppresses_adc_async
( respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/lib/test_google_cloud.py:591
Methodtest_explicit_credentials_beats_env_api_key
Per spec, explicit `credentials=` is step 1 and beats env `ANTHROPIC_API_KEY` (step 2). The credentials provider wins, env api_key is
tests/lib/test_credentials.py:4271
Methodtest_explicit_credentials_beats_env_auth_token
( self, clean_env: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture )
tests/lib/test_credentials.py:4288
Methodtest_explicit_creds_returns_true
(self)
tests/lib/test_aws_auth.py:52
Methodtest_explicit_creds_suppress_env_api_key
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:109
Methodtest_explicit_location_arg_beats_env
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_google_cloud.py:326
Methodtest_explicit_profile
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:1027
Methodtest_explicit_profile_beats_env_api_key
Explicit `profile=` is a constructor argument and beats env `ANTHROPIC_API_KEY` — the env var is not consulted.
tests/lib/test_credentials.py:3091
Methodtest_explicit_profile_beats_env_federation
Step 3 (ANTHROPIC_PROFILE) sits above step 4 (env federation). An explicit profile selection wins over a federation-configured environ
tests/lib/test_credentials.py:2360
Methodtest_explicit_project_arg_beats_env
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_google_cloud.py:312
Methodtest_exposes_configured_middleware
(self)
tests/test_middleware.py:1889
Methodtest_external
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:275
Methodtest_external_missing_credentials_file
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:300
Methodtest_external_no_expiry
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:286
Methodtest_external_rereads_credentials_on_each_call
An external process rotates the credentials file; config stays fixed.
tests/lib/test_credentials.py:290
Functiontest_extra_body_anthropic_version_wins
(respx_mock: MockRouter)
tests/lib/test_bedrock.py:372
Methodtest_extra_body_anthropic_version_wins
(self, respx_mock: MockRouter)
tests/lib/test_vertex.py:211
Methodtest_extra_body_anthropic_version_wins
(self, respx_mock: MockRouter)
tests/lib/test_vertex.py:730
Functiontest_extra_body_anthropic_version_wins_async
(respx_mock: MockRouter)
tests/lib/test_bedrock.py:390
Functiontest_extra_body_is_merged_in
(send: Send)
tests/test_prepare.py:222
Methodtest_extra_body_value_wins
(self, client: AnthropicBedrockMantle, respx_mock: MockRouter)
tests/lib/test_bedrock_mantle.py:741
Methodtest_extra_headers_case_insensitive
(self, client: Anthropic)
tests/test_client.py:599
Methodtest_extra_headers_case_insensitive
(self, async_client: AsyncAnthropic)
tests/test_client.py:2033
Methodtest_extra_headers_omit_removes_default_header_case_insensitively
(self, client_cls: ClientClass)
tests/test_header_case_sensitivity.py:131
Methodtest_extra_headers_omit_removes_sdk_header_case_insensitively
(self, client_cls: ClientClass)
tests/test_header_case_sensitivity.py:139
Methodtest_extra_headers_replace_default_headers_case_insensitively
(self, client_cls: ClientClass)
tests/test_header_case_sensitivity.py:71
Methodtest_extra_headers_replace_generated_header_param_case_insensitively
(self)
tests/test_header_case_sensitivity.py:78
Methodtest_extra_headers_replace_sdk_header_case_insensitively
(self, client_cls: ClientClass)
tests/test_header_case_sensitivity.py:92
Methodtest_extra_headers_value_is_sent_in_body
(self, client: AnthropicBedrockMantle, respx_mock: MockRouter)
tests/lib/test_bedrock_mantle.py:751
Functiontest_extra_properties
()
tests/test_models.py:1035
Methodtest_extra_query_iterator_survives_pagination
( self, respx_mock: MockRouter, client: Anthropic | AsyncAnthropic )
tests/test_prepare.py:835
Functiontest_extra_query_omit_removes_default_query
(send: Send)
tests/test_prepare.py:520
Functiontest_extract_drops_setuid_setgid_sticky
(make: ArchiveModeMaker, tmp_path: Path)
tests/lib/tools/test_skills.py:259
Methodtest_extract_files_does_not_mutate_original_nested_array_path
(self)
tests/test_files.py:175
Methodtest_extract_files_does_not_mutate_original_top_level
(self)
tests/test_files.py:164
Functiontest_extract_flat_archive_unchanged
(make: ArchiveMaker, tmp_path: Path)
tests/lib/tools/test_skills.py:183
Functiontest_extract_refuses_zip_slip
(tmp_path: Path)
tests/lib/tools/test_skills.py:192
Functiontest_extract_response_type_binary_response
()
tests/test_response.py:51
Functiontest_extract_response_type_concrete_subclasses
()
tests/test_response.py:45
Functiontest_extract_response_type_direct_class_missing_type_arg
()
tests/test_response.py:37
Functiontest_extract_response_type_direct_classes
()
tests/test_response.py:31
Functiontest_extract_strips_skill_wrapper_dir
(make: ArchiveMaker, tmp_path: Path)
tests/lib/tools/test_skills.py:164
Functiontest_extract_type_var
()
tests/test_utils/test_typing.py:27
Functiontest_extract_type_var_generic_subclass
()
tests/test_utils/test_typing.py:38
Functiontest_extract_type_var_generic_subclass_different_ordering_multiple
()
tests/test_utils/test_typing.py:67
Functiontest_extract_type_var_generic_subclass_multiple
()
tests/test_utils/test_typing.py:58
Functiontest_extract_type_var_multiple
()
tests/test_utils/test_typing.py:49
Methodtest_failed_call_ends_the_loop_with_its_error
(self, spans: Spans, respx_mock: MockRouter)
tests/lib/tools/test_open_telemetry.py:891
Functiontest_failed_compaction_request_is_not_retried_and_frees_the_messages_async
(respx_mock: MockRouter)
tests/lib/tools/test_runners.py:3191
Functiontest_failed_compaction_request_is_not_retried_and_frees_the_messages_sync
(respx_mock: MockRouter)
tests/lib/tools/test_runners.py:3170
Methodtest_failed_create_has_no_id
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:7458
Methodtest_failed_replay_clears_previous_message_id
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:752
Methodtest_failed_send_lets_the_next_send_run
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:1574
Methodtest_failed_send_lets_the_next_send_run
(self, respx_mock: MockRouter)
tests/lib/threads/test_async_beta_threads.py:385
Functiontest_failed_skill_keeps_the_directory_it_would_have_replaced
( tmp_path: Path, async_client: AsyncAnthropic, respx_mock: MockRouter, failing_download: httpx2.Response
tests/lib/tools/test_skills.py:497
Methodtest_failed_streamed_call_ends_the_loop_with_its_error
(self, spans: Spans, respx_mock: MockRouter)
tests/lib/tools/test_open_telemetry.py:908
Methodtest_failed_writeback_after_refresh_does_not_retain_tokens
A refresh that succeeds but fails to persist raises the write error (the refresh token may have rotated server-side) — but the propagating
tests/lib/test_credentials.py:5172
Methodtest_fallback_credit_usage_propagated
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:638
Methodtest_fallback_credit_usage_propagated
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:960
Methodtest_fallback_on_overloaded_error
(self, respx_mock: MockRouter)
tests/test_middleware.py:710
Methodtest_fallback_on_overloaded_error
(self, respx_mock: MockRouter)
tests/test_middleware.py:1467
Methodtest_fallback_relabels_model
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:623
Methodtest_fallback_relabels_model
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:944
Methodtest_fallback_retry_sees_identical_request_state
(self, respx_mock: MockRouter)
tests/test_middleware.py:1137
Methodtest_fallback_retry_sees_identical_request_state
(self, respx_mock: MockRouter)
tests/test_middleware.py:1660
Methodtest_falls_back_to_aws_api_key_env_var
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_bedrock_mantle.py:145
Methodtest_false_keeps_a_span_that_the_sampler_dropped_current_for_the_requests
( self, sync: bool, spans: Spans, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/test_open_telemetry.py:4199
Methodtest_false_sends_no_trace_context_and_keeps_the_span
( self, provider: str, sync: bool, spans: Spans, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPat
tests/test_open_telemetry.py:4170
Functiontest_family_or_type_named_block_without_toolset_name_is_not_a_member_call
( client: Anthropic, async_client: AsyncAnthropic, respx_mock: MockRouter, flavour: str )
tests/lib/tools/toolsets/test_runner.py:328
Functiontest_field_named_cls
()
tests/test_models.py:948
Methodtest_file_input_is_read_when_the_stream_is_entered
( self, respx_mock: MockRouter, tmp_path: pathlib.Path, monkeypatch: pytest.MonkeyPatch )
tests/lib/streaming/test_messages.py:515
Methodtest_file_input_is_read_when_the_stream_is_entered
( self, respx_mock: MockRouter, tmp_path: pathlib.Path, monkeypatch: pytest.MonkeyPatch )
tests/lib/streaming/test_beta_messages.py:694
Methodtest_file_input_markers
(self, respx_mock: MockRouter, client: Anthropic | AsyncAnthropic)
tests/test_prepare.py:793
Functiontest_file_objects_must_read_as_bytes
(send: Send, monkeypatch: pytest.MonkeyPatch)
tests/test_prepare.py:661
Functiontest_file_tools_confinement_matrix
The full path policy through the real tools: the workdir works, a memory folder mounted outside it works, a read-only memory folder reads but
tests/lib/tools/test_agent_toolset.py:1215
Methodtest_file_upload_tag_is_appended_not_clobbered
(self, client: Anthropic, respx_mock: respx.MockRouter)
tests/lib/test_stainless_helpers.py:85
Methodtest_file_upload_tag_is_appended_not_clobbered
( self, async_client: AsyncAnthropic, respx_mock: respx.MockRouter )
tests/lib/test_stainless_helpers.py:184
Methodtest_file_upload_with_request_copying_middleware
(self, respx_mock: MockRouter, tmp_path: Path)
tests/test_middleware.py:1210
Methodtest_file_value_is_same_reference
(self)
tests/test_files.py:121
Functiontest_file_without_a_name_is_sent_unnamed
()
tests/test_files.py:88
Functiontest_files_without_a_marker_are_neither_pushed_nor_pulled_over
Only the marker was deleted (a dotfile cleanup): the remaining files may hold un-pushed edits, so the pass must neither upload them, nor delete by
tests/lib/tools/memory_sync/test_folder_trust.py:149
Functiontest_filestore_async_with_removes_root_only_if_created
(tmp_path: Path)
tests/lib/tools/test_file_store.py:333
Functiontest_filestore_create_root_makes_the_folder_owner_only
(tmp_path: Path)
tests/lib/tools/test_file_store.py:507
Functiontest_filestore_creates_every_parent_owner_only_under_permissive_umask
Every directory the store creates — including intermediate parents, which `mkdir(parents=True, mode=...)` would leave at the umask default — is 0o
tests/lib/tools/test_file_store.py:72
Functiontest_filestore_dispose_removes_the_root_it_created_and_keeps_preexisting
(tmp_path: Path)
tests/lib/tools/test_file_store.py:347
Functiontest_filestore_every_verb_refuses_an_escaping_path
`..` (and absolute) paths raise FileStoreError on every verb; nothing is read or written outside the root.
tests/lib/tools/test_file_store.py:88
Functiontest_filestore_find_symlinks_reports_every_symlink
Listings skip symlinks silently; `find_symlinks` is how a caller sees them.
tests/lib/tools/test_file_store.py:177
Functiontest_filestore_get_does_not_follow_a_symlink_leaf
A symlink at the target is refused on read and replaced — not written through — on put.
tests/lib/tools/test_file_store.py:117
Functiontest_filestore_get_refuses_a_non_regular_file
A present-but-non-regular leaf (fifo, symlink, ...) raises FileStoreError instead of hanging or being read.
tests/lib/tools/test_file_store.py:132
← previousnext →6,201–6,300 of 12,274, ranked by callers