MCPcopy Create free account

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

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

Methodtest_vertex_middleware_sees_canonical_request
(self, respx_mock: MockRouter)
tests/test_middleware.py:1994
Methodtest_view_directory
(self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:162
Methodtest_view_directory
(self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:786
Methodtest_view_error_for_files_with_too_many_lines
( self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:214
Methodtest_view_error_for_files_with_too_many_lines
( self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:840
Methodtest_view_error_for_non_existent_file
(self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:206
Methodtest_view_error_for_non_existent_file
( self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:830
Methodtest_view_file
(self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:145
Methodtest_view_file
(self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:769
Methodtest_view_file_with_range
(self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:188
Methodtest_view_file_with_range
(self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:812
Methodtest_view_lists_symlinks_only_when_they_stay_inside_memories
( self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:646
Methodtest_view_lists_symlinks_only_when_they_stay_inside_memories
( self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:1320
Methodtest_view_preserves_crlf_line_endings
(self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:369
Methodtest_view_preserves_crlf_line_endings
( self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:997
Methodtest_view_rejects_directory_symlink_created_after_validation
( self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool, monkeypatch: pytest
tests/lib/tools/memory_tools/test_filesystem.py:611
Methodtest_view_rejects_directory_symlink_created_after_validation
( self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool, monkeypatch:
tests/lib/tools/memory_tools/test_filesystem.py:1282
Functiontest_view_result_file_types_all_keep_or_lose_their_content
(view_result: Any)
tests/test_open_telemetry.py:8549
Methodtest_walks_each_hop_through_the_chain_until_a_model_accepts
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:247
Methodtest_walks_each_hop_through_the_chain_until_a_model_accepts
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:802
Methodtest_warns_once_when_falling_back_without_a_state
( self, respx_mock: MockRouter, caplog: pytest.LogCaptureFixture )
tests/lib/test_refusal_fallback.py:195
Methodtest_warns_once_when_falling_back_without_a_state
( self, respx_mock: MockRouter, caplog: pytest.LogCaptureFixture )
tests/lib/test_refusal_fallback_streaming.py:697
Functiontest_windows_network_and_device_paths_are_refused_lexically_on_windows
Refused before the filesystem is touched: resolving a UNC path makes the Windows redirector authenticate to the named host, and a DOS device name
tests/lib/tools/toolsets/test_security.py:208
Methodtest_with_expiry
(self)
tests/lib/test_credentials.py:189
Methodtest_with_middleware_appends_without_mutating_original
(self)
tests/test_middleware.py:1242
Methodtest_with_middleware_client_runs_appended_middleware_innermost
(self, respx_mock: MockRouter)
tests/test_middleware.py:1264
Methodtest_with_middleware_client_runs_appended_middleware_innermost
(self, respx_mock: MockRouter)
tests/test_middleware.py:1834
Methodtest_with_middleware_validates_like_the_constructor
(self)
tests/test_middleware.py:1254
Methodtest_with_options
(self)
tests/lib/test_vertex.py:280
Methodtest_with_options
(self)
tests/lib/test_vertex.py:801
Methodtest_with_options_alias
(self)
tests/lib/test_credentials.py:2906
Methodtest_with_options_append_idiom
(self, respx_mock: MockRouter)
tests/test_middleware.py:1895
Methodtest_with_options_client_runs_inherited_middleware
(self, respx_mock: MockRouter)
tests/test_middleware.py:1291
Methodtest_with_options_does_not_accumulate_case_variants
(self, client_cls: ClientClass)
tests/test_header_case_sensitivity.py:189
Methodtest_with_options_false_and_empty_replace_the_clients_option
( self, sync: bool, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:4620
Methodtest_with_options_headers_case_insensitive
(self, client: Anthropic)
tests/test_client.py:629
Methodtest_with_options_headers_case_insensitive
(self, async_client: AsyncAnthropic)
tests/test_client.py:2080
Methodtest_with_options_omit_removes_default_header_case_insensitively
(self, client_cls: ClientClass)
tests/test_header_case_sensitivity.py:157
Methodtest_with_options_overrides
Test with_options() applies overrides while keeping everything else.
tests/lib/test_azure.py:98
Functiontest_with_options_overrides_win
(client_class: ClientClass)
tests/lib/test_client_copy.py:379
Methodtest_with_options_replaces_default_header_case_insensitively
(self, client_cls: ClientClass)
tests/test_header_case_sensitivity.py:179
Functiontest_with_options_replaces_default_headers_and_query
(client_class: ClientClass)
tests/lib/test_client_copy.py:404
Methodtest_with_options_replaces_propagation_with_the_rest_of_the_option
( self, sync: bool, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:4296
Methodtest_with_options_replaces_the_clients_whole_option
( self, sync: bool, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:4437
Methodtest_with_options_replaces_traces_whole_too
(self, sync: bool, spans: Spans)
tests/test_open_telemetry.py:4461
Methodtest_with_raw_response_flows_through_middleware
(self, respx_mock: MockRouter)
tests/test_middleware.py:1046
Methodtest_with_raw_response_flows_through_middleware
(self, respx_mock: MockRouter)
tests/test_middleware.py:1569
Methodtest_with_raw_response_middleware_sees_api_response
(self, respx_mock: MockRouter)
tests/test_middleware.py:1064
Methodtest_with_raw_response_middleware_sees_api_response
(self, respx_mock: MockRouter)
tests/test_middleware.py:1587
Methodtest_with_streaming_response_middleware_sees_api_response
(self, respx_mock: MockRouter)
tests/test_middleware.py:1091
Methodtest_with_streaming_response_middleware_sees_api_response
(self, respx_mock: MockRouter)
tests/test_middleware.py:1614
Functiontest_within_compares_windows_names_exactly
(root: str, child: str, expected: bool)
tests/lib/tools/test_skills.py:57
Functiontest_without_the_option_every_tool_runs_after_the_loop_body_as_before
(setup: SetupFactory)
tests/lib/tools/test_runner_eager_tools.py:164
Functiontest_without_the_option_the_tools_run_again_after_append_messages_as_before
(setup: SetupFactory)
tests/lib/tools/test_runner_eager_tools.py:202
Functiontest_without_the_option_there_is_nothing_to_defer
(setup: SetupFactory)
tests/lib/tools/test_runner_eager_tools.py:190
Functiontest_work_resource_worker_and_poller_async_only
`worker()` / `poller()` build an async-only `EnvironmentWorker` / `aiter_work` generator, so they live on `AsyncWork` and are NOT exposed on t
tests/lib/environments/test_worker.py:988
Functiontest_work_resource_worker_builds_environment_worker
`client.beta.environments.work.worker(...)` builds an `EnvironmentWorker` bound to the client, with the options threaded through (mirrors `poller`
tests/lib/environments/test_worker.py:939
Functiontest_work_resource_worker_defaults
()
tests/lib/environments/test_worker.py:974
Functiontest_work_span_ends_ok_when_the_consumer_stops_polling
(sync: bool, respx_mock: MockRouter)
tests/lib/environments/test_poller_method.py:677
Functiontest_work_span_fails_when_the_item_cannot_be_acked
(sync: bool, respx_mock: MockRouter)
tests/lib/environments/test_poller_method.py:705
Functiontest_work_span_has_no_status_when_polling_is_interrupted_during_the_ack
( sync: bool, respx_mock: MockRouter )
tests/lib/environments/test_poller_method.py:738
Functiontest_worker_can_turn_sync_deletions_off
`memory_sync_deletions="disabled"` reaches the stores: a local deletion never propagates however many syncs run, while uploads still do.
tests/lib/tools/memory_sync/test_e2e_memory.py:458
Functiontest_worker_clean_end_syncs_once_and_the_flush_adds_nothing
( tmp_path: Path, monkeypatch: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture )
tests/lib/tools/memory_sync/test_e2e_memory.py:278
Functiontest_worker_fails_the_item_when_a_memory_store_cannot_be_downloaded
A folder already at the store's path is debris from a run that died. The download refuses it and the ITEM fails — rather than serving a session wh
tests/lib/tools/memory_sync/test_e2e_memory.py:210
Functiontest_worker_fails_the_item_when_the_sessions_token_is_missing
The session has memory stores attached but the work item carried no sessions token, so its memories cannot be mounted. The ITEM fails before a
tests/lib/tools/memory_sync/test_e2e_memory.py:165
Functiontest_worker_final_sync_is_bounded_and_the_flush_still_runs
A final sync that hangs is cut off at MEMORY_FLUSH_TIMEOUT and says so; the flush after it still uploads the last edit.
tests/lib/tools/memory_sync/test_e2e_memory.py:370
Functiontest_worker_flush_is_bounded_and_teardown_still_runs
A flush that hangs is cut off at MEMORY_FLUSH_TIMEOUT and says so; dispose still runs.
tests/lib/tools/memory_sync/test_e2e_memory.py:334
Functiontest_worker_flushes_after_a_clean_final_sync_that_failed
sync() swallows its own failures, so a clean stream end whose final sync broke would silently lose the last edits — the teardown flush is thei
tests/lib/tools/memory_sync/test_e2e_memory.py:310
Functiontest_worker_flushes_and_disposes_even_when_env_teardown_raises
A raising env.__aexit__ must not skip the flush or leave the folder behind for the next work item to trip over.
tests/lib/tools/memory_sync/test_e2e_memory.py:488
Functiontest_worker_flushes_writes_when_the_stream_raises
( tmp_path: Path, monkeypatch: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture )
tests/lib/tools/memory_sync/test_e2e_memory.py:236
Functiontest_worker_grants_file_tools_access_to_store_folders
The tool context handed to the tools factory carries the downloaded store folders as allowed roots, so the file tools can reach a memory mount
tests/lib/tools/memory_sync/test_e2e_memory.py:582
Functiontest_worker_lifecycle_cadence_and_dispose
The worker's call sequence: download → sync_if_due per call → finish → dispose.
tests/lib/tools/memory_sync/test_memory_sync.py:163
Functiontest_worker_logs_what_a_cut_off_flush_left_behind
One upload never completes: the flush is cut off, the store logs that one of its two changed files did not make it, and the other one did.
tests/lib/tools/memory_sync/test_e2e_memory.py:402
Functiontest_worker_rejects_a_sub_floor_interval
(tmp_path: Path, monkeypatch: pytest.MonkeyPatch)
tests/lib/tools/memory_sync/test_e2e_memory.py:203
Functiontest_worker_skips_memory_when_the_interval_is_none
( tmp_path: Path, monkeypatch: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture )
tests/lib/tools/memory_sync/test_e2e_memory.py:188
Functiontest_worker_stays_quiet_when_no_memory_store_is_attached
Most sessions have no memory at all. Missing a sessions token is only worth shouting about when there is memory the session cannot reach.
tests/lib/tools/memory_sync/test_e2e_memory.py:442
Functiontest_worker_syncs_on_cadence_finishes_and_disposes
(tmp_path: Path, monkeypatch: pytest.MonkeyPatch)
tests/lib/tools/memory_sync/test_e2e_memory.py:135
Functiontest_worker_threads_extra_headers_into_poll_heartbeat_stop_and_runner
A worker-level `extra_headers` is threaded, unchanged, into every per-request call the worker drives: the poll loop (forwarded to `aiter_work`
tests/lib/environments/test_worker.py:883
Methodtest_workload_delegate_borrows_parent_http_client
The workload delegate must borrow CredentialsFile's owned httpx2.Client rather than creating its own. CredentialsFile.close() then has a singl
tests/lib/test_credentials.py:599
Methodtest_workload_identity_disk_cache_corrupt_expires_at_reexchange
A non-numeric expires_at in the on-disk credentials file falls through to re-exchange instead of raising.
tests/lib/test_credentials.py:566
Methodtest_workload_identity_disk_cache_stale_reexchange
A stale on-disk credentials file is ignored — fresh exchange happens and the file is rewritten.
tests/lib/test_credentials.py:538
Methodtest_workload_identity_disk_cache_without_fchmod
(self, respx_mock: MockRouter, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:516
Methodtest_workload_identity_dispatch
(self, respx_mock: MockRouter, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:354
Methodtest_workload_identity_error_body_redacted
(self)
tests/lib/test_credentials.py:998
Methodtest_workload_identity_error_propagates_through_request_flow
A WorkloadIdentityError raised from the credential provider must bubble out of messages.create() as-is, not wrapped in APIConnectionEr
tests/lib/test_credentials.py:3102
Methodtest_workload_identity_http_rejected
(self)
tests/lib/test_credentials.py:874
Methodtest_workload_identity_inherits_client_base_url
An explicitly-passed WorkloadIdentityCredentials with no `base_url` adopts the client's `base_url` for the token exchange, so the user
tests/lib/test_credentials.py:2490
Methodtest_workload_identity_literal_token
(self, clean_env: pytest.MonkeyPatch)
tests/lib/test_credentials.py:2199
Methodtest_workload_identity_literal_token_reads_fresh
Fix 4: ANTHROPIC_IDENTITY_TOKEN must be re-read on every provider invocation, not captured into a closure at chain-construction time.
tests/lib/test_credentials.py:2248
Methodtest_workload_identity_missing_required_fields
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:591
Methodtest_workload_identity_requires_all_three
(self, clean_env: pytest.MonkeyPatch)
tests/lib/test_credentials.py:2263
Methodtest_workload_identity_scope_env
(self, clean_env: pytest.MonkeyPatch)
tests/lib/test_credentials.py:2207
Methodtest_workload_identity_tier
(self, clean_env: pytest.MonkeyPatch, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:2189
Methodtest_workload_identity_token_omitted_uses_env
( self, tmp_path: pathlib.Path, monkeypatch: pytest.MonkeyPatch )
tests/lib/test_credentials.py:644
Methodtest_workload_identity_unknown_source_raises
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:630
Methodtest_workload_identity_workspace_id_env
(self, clean_env: pytest.MonkeyPatch)
tests/lib/test_credentials.py:2217
Methodtest_workload_identity_workspace_id_env_empty_treated_unset
`ANTHROPIC_WORKSPACE_ID=""` (a defaulted-but-empty CI variable) is treated as unset — never put `"workspace_id": ""` on the wire.
tests/lib/test_credentials.py:2229
Methodtest_workspace_id_default_sentinel
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:1173
Functiontest_workspace_id_header
(respx_mock: MockRouter, request_workspace_id: Optional[str], expected: str)
tests/lib/test_aws.py:466
Functiontest_workspace_id_header_async
( respx_mock: MockRouter, request_workspace_id: Optional[str], expected: str )
tests/lib/test_aws.py:490
← previousnext →11,401–11,500 of 12,431, ranked by callers