MCPcopy Create free account

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

Functions9,455 in github.com/anthropics/anthropic-sdk-python

Functiontest_has_all_resources
()
tests/lib/test_aws.py:388
Methodtest_headers_default_to_empty_mapping
(self)
tests/test_middleware.py:402
Functiontest_heartbeat_412_releases_item_without_stopping_it
A 412 on the heartbeat means the server cleared this worker's lease (re-queued the item, or another worker holds it). The run ends, the item i
tests/lib/environments/test_worker.py:480
Functiontest_heartbeat_conflict_is_retried_until_the_lease_is_stale
( monkeypatch: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture )
tests/lib/environments/test_worker.py:1112
Functiontest_heartbeat_keeps_beating_while_a_sync_tool_blocks
Heartbeat loop and tool call share one task group, as they do in `_handle_item`.
tests/lib/environments/test_worker.py:1154
Functiontest_heartbeat_permanent_4xx_stops_immediately
( monkeypatch: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture )
tests/lib/environments/test_worker.py:1142
Functiontest_heartbeat_starts_before_skill_download
Regression: the lease heartbeat must already be running while skills are downloaded. Skill setup (`AgentToolContext.__aenter__`) can take lon
tests/lib/environments/test_worker.py:972
Functiontest_heartbeat_that_never_returns_is_cut_off_each_interval
( monkeypatch: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture )
tests/lib/environments/test_worker.py:1130
Functiontest_held_ask_call_does_not_block_other_dispatches
Holding an ask-gated call must not stall the rest of the queue: an ungated call arriving after it executes immediately, and the gated call fol
tests/lib/tools/test_session_runner.py:925
Functiontest_held_ask_call_keeps_runner_alive
While a call awaits its confirmation the runner must keep running — even if history (defensively) ends on an `end_turn` idle — so the verdict
tests/lib/tools/test_session_runner.py:797
Functiontest_helper_header
()
tests/lib/test_stainless_helpers.py:32
Functiontest_helper_header_is_an_append_header
()
tests/lib/test_stainless_helpers.py:36
Functiontest_holds_a_call_that_is_deferred
(setup: SetupFactory, at: str)
tests/lib/tools/test_runner_eager_tools.py:405
Functiontest_holds_a_call_that_the_caller_defers_until_the_loop_body_ends
(setup: SetupFactory)
tests/lib/tools/test_runner_eager_tools.py:82
Methodtest_http_4xx_does_not_retain_assertion
(self)
tests/lib/test_credentials.py:4452
Methodtest_http_base_url_in_config_file_raises_anthropic_error
( self, clean_env: pytest.MonkeyPatch, tmp_path: pathlib.Path )
tests/lib/test_credentials.py:3927
Methodtest_http_base_url_on_workload_provider_raises_anthropic_error
(self)
tests/lib/test_credentials.py:3918
Methodtest_http_base_url_rejected
(self)
tests/lib/test_credentials.py:3183
Methodtest_http_client_timeout_option
(self)
tests/test_client.py:348
Methodtest_http_client_timeout_option
(self)
tests/test_client.py:1643
Methodtest_httpx_objects_rejected
(self, client: Anthropic)
tests/test_client.py:395
Methodtest_httpx_objects_rejected
(self, async_client: AsyncAnthropic)
tests/test_client.py:1690
Functiontest_idempotent_and_does_not_mutate_input
( send: Send, make_body: Callable[[], object], sent: object, monkeypatch: pytest.MonkeyPatch )
tests/test_prepare.py:714
Methodtest_identity_token_file_binary_content_raises_anthropic_error
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:3966
Methodtest_identity_token_file_directory_raises_anthropic_error
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:3959
Methodtest_identity_token_file_empty_raises_anthropic_error
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:3974
Methodtest_identity_token_file_permission_error_raises_anthropic_error
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:3943
Methodtest_identity_token_provider_override
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:3049
Functiontest_idle_after_turn_ends_ends_iteration
(stop_reason: str, in_history: bool)
tests/lib/tools/test_session_runner.py:1233
Functiontest_idle_grace_does_not_fire_without_end_turn
()
tests/lib/tools/test_session_runner.py:1261
Functiontest_ignores_incorrect_paths
( query: dict[str, object], paths: Sequence[Sequence[str]], expected: list[tuple[str, FileTypes]],
tests/test_extract_files.py:65
Methodtest_image_content_gif
(self)
tests/lib/tools/test_mcp_tool.py:104
Methodtest_image_content_jpeg
(self)
tests/lib/tools/test_mcp_tool.py:97
Methodtest_image_content_png
(self)
tests/lib/tools/test_mcp_tool.py:89
Methodtest_image_content_webp
(self)
tests/lib/tools/test_mcp_tool.py:108
Functiontest_image_media_types_track_the_generated_image_source
()
tests/lib/tools/toolsets/test_computer_surface.py:99
Methodtest_image_resource
(self)
tests/lib/tools/test_mcp_tool.py:230
Methodtest_image_unsupported_mime_type
(self)
tests/lib/tools/test_mcp_tool.py:112
Methodtest_includes_query_params_in_signing
URL query params must be part of the signed request.
tests/lib/test_aws_auth.py:541
Methodtest_includes_security_token_header
(self)
tests/lib/test_aws_auth.py:490
Methodtest_incomplete_response
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:748
Functiontest_init_api_key_mode
()
tests/lib/test_aws.py:26
Functiontest_init_async_api_key_mode
()
tests/lib/test_aws.py:75
Functiontest_init_async_requires_workspace_id
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws.py:91
Functiontest_init_async_sigv4
()
tests/lib/test_aws.py:81
Functiontest_init_requires_region_for_sigv4
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws.py:57
Functiontest_init_requires_workspace_id
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws.py:63
Functiontest_init_sigv4_default_credential_chain
()
tests/lib/test_aws.py:51
Functiontest_init_sigv4_explicit_creds
()
tests/lib/test_aws.py:32
Functiontest_init_sigv4_profile
()
tests/lib/test_aws.py:45
Methodtest_init_with_token_provider_and_base_url
(self)
tests/lib/test_google_cloud.py:70
Functiontest_init_workspace_id_from_env
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws.py:69
Methodtest_initialization_from_environment_variables
Test client initialization falls back to environment variables.
tests/lib/test_azure.py:44
Methodtest_initialization_from_environment_variables
Test async client initialization falls back to environment variables.
tests/lib/test_azure.py:144
Methodtest_initialization_with_azure_ad_token_provider
Test client initialization with Azure AD token provider.
tests/lib/test_azure.py:30
Methodtest_initialization_with_base_url
Test client initialization with base_url instead of resource.
tests/lib/test_azure.py:21
Methodtest_input_transformations_propagated
( self, respx_mock: MockRouter, fixture: str, expected: List[Dict[str, str]] )
tests/lib/streaming/test_beta_messages.py:628
Methodtest_input_transformations_propagated
( self, respx_mock: MockRouter, fixture: str, expected: List[Dict[str, str]] )
tests/lib/streaming/test_beta_messages.py:884
Functiontest_inputs_are_parsed_into_the_generated_models_and_undeclared_keys_are_kept
()
tests/lib/tools/toolsets/test_computer_pipeline.py:148
Methodtest_insert
(self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:295
Methodtest_insert
(self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:820
Methodtest_insert_at_beginning_of_file
(self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:312
Methodtest_insert_at_beginning_of_file
( self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:837
Methodtest_insert_at_end_of_file
(self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:328
Methodtest_insert_at_end_of_file
(self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:855
Methodtest_insert_error_for_invalid_insert_line
( self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:393
Methodtest_insert_error_for_invalid_insert_line
( self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:928
Methodtest_insert_error_for_non_existent_file
( self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:381
Methodtest_insert_error_for_non_existent_file
( self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:916
Methodtest_insert_preserves_crlf_line_endings
( self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:368
Methodtest_insert_preserves_crlf_line_endings
( self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:901
Functiontest_int_to_float_safe_conversion
()
tests/test_models.py:453
Functiontest_integer_schema_with_min_max_exclusive
()
tests/lib/_parse/test_transform.py:175
Functiontest_interpolation
(template: str, kwargs: dict[str, Any], expected: str)
tests/test_utils/test_path.py:59
Methodtest_invalid_expires_in_does_not_retain_minted_token
(self, expires_in: str)
tests/lib/test_credentials.py:4459
Methodtest_invalid_http_client
(self)
tests/test_client.py:385
Methodtest_invalid_http_client
(self)
tests/test_client.py:1680
Methodtest_invalid_json_credentials_does_not_retain_raw_text
( self, clean_env: pytest.MonkeyPatch, tmp_path: pathlib.Path )
tests/lib/test_credentials.py:4660
Methodtest_invalid_profile_name_raises_anthropic_error
( self, clean_env: pytest.MonkeyPatch, tmp_path: pathlib.Path )
tests/lib/test_credentials.py:3902
Methodtest_invalidate
(self)
tests/lib/test_credentials.py:1658
Methodtest_invalidate_forces_provider_refresh
PY-02: after invalidate(), the next provider call receives force_refresh=True so providers with on-disk caches bypass their freshness
tests/lib/test_credentials.py:1851
Functiontest_is_fatal_status_error
(status: int, fatal: bool)
tests/lib/environments/test_poller.py:44
Functiontest_is_fatal_status_error_ignores_non_api_errors
()
tests/lib/environments/test_poller.py:48
Functiontest_isinstance_check
(client: Anthropic, async_client: AsyncAnthropic)
tests/test_streaming.py:241
Functiontest_isinstance_does_not_error
()
tests/test_utils/test_proxy.py:26
Functiontest_iso8601_datetime
()
tests/test_models.py:423
Functiontest_iter_work_auto_stop_false_does_not_stop_on_body_raise
()
tests/lib/environments/test_poller_method.py:288
Functiontest_iter_work_auto_stop_false_never_stops
A dispatcher hands work off to another process that owns the stop call. The poller must not stop the lease out from under that process.
tests/lib/environments/test_poller_method.py:274
Functiontest_iter_work_backs_off_on_httpx_transport_error
A raw `httpx` transport error (not wrapped in an SDK `APIError`) is still transient and must be retried, not propagated.
tests/lib/environments/test_poller_method.py:200
Functiontest_iter_work_backs_off_on_transient_error
(status: int)
tests/lib/environments/test_poller_method.py:165
Functiontest_iter_work_block_ms_none_omits_param
The server rejects block_ms=0; None must translate to the omit sentinel so the poll is non-blocking instead of 400ing.
tests/lib/environments/test_poller_method.py:307
Functiontest_iter_work_calls_stop_when_body_raises
()
tests/lib/environments/test_poller_method.py:151
Functiontest_iter_work_drain_returns_immediately_when_queue_empty
()
tests/lib/environments/test_poller_method.py:266
Functiontest_iter_work_drain_returns_on_empty_queue
()
tests/lib/environments/test_poller_method.py:255
Functiontest_iter_work_force_stops_on_permanent_ack_failure
A permanent 4xx on ack force-stops the item rather than re-delivering it.
tests/lib/environments/test_poller_method.py:239
Functiontest_iter_work_forwards_reclaim_older_than_ms
()
tests/lib/environments/test_poller_method.py:299
Functiontest_iter_work_logs_idle_polling
(monkeypatch: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture)
tests/lib/environments/test_poller_method.py:369
Functiontest_iter_work_propagates_non_api_error_from_ack
Same for a non-API error raised by `ack` — it propagates rather than backing off and retrying.
tests/lib/environments/test_poller_method.py:223
Functiontest_iter_work_propagates_non_api_error_instead_of_retrying
A programming error (here `KeyError`) is not a transient API/transport failure, so it must propagate immediately rather than be swallowed and
tests/lib/environments/test_poller_method.py:211
Functiontest_iter_work_raises_on_permanent_4xx
()
tests/lib/environments/test_poller_method.py:174
← previousnext →4,901–5,000 of 9,455, ranked by callers