MCPcopy Create free account

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

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

Methodtest_invalidate_forces_provider_refresh
After invalidate(), the next provider call receives force_refresh=True so providers with on-disk caches bypass their freshness short-c
tests/lib/test_credentials.py:1911
Methodtest_is_content_query
(self, query: str, content_names: tuple[str, ...], content: bool)
tests/test_open_telemetry.py:3369
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
Methodtest_is_resent_once_without_speed
( self, respx_mock: MockRouter, caplog: pytest.LogCaptureFixture, status: int )
tests/lib/test_refusal_fallback.py:844
Methodtest_is_resent_once_without_speed
( self, respx_mock: MockRouter, caplog: pytest.LogCaptureFixture, status: int )
tests/lib/test_refusal_fallback.py:941
Methodtest_is_resent_once_without_speed
( self, respx_mock: MockRouter, caplog: pytest.LogCaptureFixture, status: int )
tests/lib/test_refusal_fallback_streaming.py:1647
Methodtest_is_resent_once_without_speed
( self, respx_mock: MockRouter, caplog: pytest.LogCaptureFixture, status: int )
tests/lib/test_refusal_fallback_streaming.py:1898
Functiontest_isinstance_check
(client: Anthropic, async_client: AsyncAnthropic)
tests/test_streaming.py:351
Functiontest_isinstance_does_not_error
()
tests/test_utils/test_proxy.py:26
Functiontest_iso8601_datetime
()
tests/test_models.py:438
Functiontest_iter_work_auto_stop_false_does_not_stop_on_body_raise
()
tests/lib/environments/test_poller_method.py:304
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:290
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:216
Functiontest_iter_work_backs_off_on_transient_error
(status: int)
tests/lib/environments/test_poller_method.py:181
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:323
Functiontest_iter_work_calls_stop_when_body_raises
()
tests/lib/environments/test_poller_method.py:167
Functiontest_iter_work_drain_returns_immediately_when_queue_empty
()
tests/lib/environments/test_poller_method.py:282
Functiontest_iter_work_drain_returns_on_empty_queue
()
tests/lib/environments/test_poller_method.py:271
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:255
Functiontest_iter_work_forwards_reclaim_older_than_ms
()
tests/lib/environments/test_poller_method.py:315
Functiontest_iter_work_logs_idle_polling
(monkeypatch: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture)
tests/lib/environments/test_poller_method.py:385
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:239
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:227
Functiontest_iter_work_raises_on_permanent_4xx
()
tests/lib/environments/test_poller_method.py:190
Functiontest_iter_work_stop_conflict_is_silent
A 409 from `stop` means the work already ended; it is neither logged nor allowed to break the loop.
tests/lib/environments/test_poller_method.py:198
Functiontest_iter_work_threads_extra_headers_into_force_stop
A permanent ack failure force-stops the item; the passthrough header must ride along on that force-stop call too.
tests/lib/environments/test_poller_method.py:519
Functiontest_iter_work_threads_extra_headers_into_poll_ack_stop
()
tests/lib/environments/test_poller_method.py:505
Functiontest_iter_work_yields_acks_and_stops_one_item
()
tests/lib/environments/test_poller_method.py:151
Functiontest_iterable_construction
(data: Iterable[int], expected_validated: Iterable[int])
tests/test_models.py:1081
Functiontest_iterable_construction_str_falls_back_to_list
()
tests/test_models.py:1097
Methodtest_iterables_and_mappings
(self)
tests/test_utils/test_json.py:38
Functiontest_jitter_within_bounds
()
tests/lib/environments/test_poller.py:23
Methodtest_json_string_echo_response_does_not_retain_assertion
A 200 whose body is a JSON *string* echoing the assertion must be rejected at the wrap boundary — never bound to a frame local on its
tests/lib/test_credentials.py:4927
Functiontest_keeps_const_and_enum_and_drops_type
(schema: dict[str, Any], expected: dict[str, Any])
tests/lib/_parse/test_transform.py:89
Functiontest_keeps_none
(send: Send)
tests/test_prepare.py:232
Functiontest_keeps_pydantic_literals
()
tests/lib/_parse/test_transform.py:120
Functiontest_keeps_the_host_and_headers_of_the_parents_credential
`copy()` drops both with the credential that brought them, but the bearer is for the deployment and workspace the parent talks to.
tests/lib/test_scoped_client.py:168
Functiontest_keyword_only_param
()
tests/test_required_args.py:30
Methodtest_late_per_request_result_does_not_replace_cached_expiring_token
(self)
tests/lib/test_credentials.py:2071
Methodtest_later_request_options_replace_the_threads_as_a_whole
(self, respx_mock: MockRouter)
tests/lib/threads/test_async_beta_threads.py:136
Methodtest_later_thread_events_do_not_replace_the_primary_thread
( self, spans: Spans, respx_mock: MockRouter )
tests/lib/tools/test_open_telemetry.py:2429
Methodtest_later_turns_run_in_the_container_of_the_last_reply
( self, respx_mock: MockRouter, fields: dict[str, Any], expected: Any )
tests/lib/threads/test_beta_threads.py:1177
Functiontest_leading_semicolon_rejected
(template: str, kwargs: dict[str, Any])
tests/test_utils/test_path.py:109
Functiontest_lease_assumed_lost_releases_item_without_stopping_it
Transient heartbeat failures lasting past the lease TTL mean another worker may hold the item by now, so it is released without a force-stop.
tests/lib/environments/test_worker.py:557
Functiontest_lease_lost_classification
Only the two reasons where the item now belongs to someone else read as lost; every other reason, and no recorded reason at all, keeps the for
tests/lib/environments/test_worker.py:588
Methodtest_leaves_accepted_requests_and_the_response_untouched
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:232
Functiontest_lets_the_caller_refuse_a_held_call_by_removing_its_tool
(setup: SetupFactory)
tests/lib/tools/test_runner_eager_tools.py:537
Methodtest_lib_client_construction_validates_middleware
(self)
tests/test_middleware.py:2154
Methodtest_lib_clients_copy_inherits_replaces_and_clears
(self)
tests/test_middleware.py:2114
Methodtest_list_comprehension
(self)
tests/lib/tools/test_mcp_tool.py:198
Methodtest_list_comprehension
(self)
tests/lib/tools/test_mcp_tool.py:317
Methodtest_list_has_only_the_ids_in_its_path
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:7590
Functiontest_list_in_a_query
(client_class: ClientClass)
tests/lib/test_client_copy.py:349
Functiontest_list_mismatched_type
()
tests/test_models.py:130
Functiontest_list_nested_model
()
tests/test_models.py:69
Functiontest_list_of_unions
()
tests/test_models.py:320
Functiontest_list_optional_items_nested_model
()
tests/test_models.py:110
Methodtest_list_popped_wholesale
(self)
tests/test_files.py:128
Functiontest_lists_only_the_call_that_the_caller_defers_and_not_its_toolsets_later_calls
( setup: SetupFactory, )
tests/lib/tools/test_runner_eager_toolsets.py:250
Functiontest_lists_only_the_call_that_the_caller_defers_and_not_the_calls_after_it
(setup: SetupFactory)
tests/lib/tools/test_runner_eager_tools.py:445
Functiontest_lists_the_calls_that_are_being_held_so_that_the_caller_can_decide_about_them
( setup: SetupFactory, )
tests/lib/tools/test_runner_eager_tools.py:122
Functiontest_live_idle_while_call_held_keeps_runner_alive
An `end_turn` idle arriving on the LIVE stream while a call is held for confirmation must not start the idle countdown — stopping would drop t
tests/lib/tools/test_session_runner.py:852
Methodtest_live_stream_alone_does_not_tell_the_primary_thread
( self, spans: Spans, respx_mock: MockRouter )
tests/lib/tools/test_open_telemetry.py:2524
Functiontest_local_deletions_reach_the_server_unless_it_changed
(tmp_path: Path, clock: Clock)
tests/lib/tools/memory_sync/test_memory_sync.py:79
Functiontest_local_file_policy_construction_rules
(tmp_path: Path)
tests/lib/tools/toolsets/test_security.py:362
Functiontest_local_file_policy_download_visibility
(tmp_path: Path)
tests/lib/tools/toolsets/test_security.py:347
Functiontest_local_file_policy_resolves_uploads_under_its_roots
(tmp_path: Path)
tests/lib/tools/toolsets/test_security.py:304
Functiontest_local_file_policy_vets_document_ids_against_its_allowlist
()
tests/lib/tools/toolsets/test_security.py:324
Functiontest_localfilestore_is_an_alias_for_the_combined_class
()
tests/lib/tools/test_file_store.py:42
Methodtest_location_defaults_to_global
(self)
tests/lib/test_google_cloud.py:284
Methodtest_location_defaults_to_global
(self)
tests/lib/test_google_cloud.py:1475
Methodtest_location_from_env
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_google_cloud.py:320
Functiontest_log_only_mode_logs_the_delete_but_never_sends_it
The dry-run setting: the full pipeline runs — window, re-checks, cap — but the confirmed delete is logged instead of sent, on every sync while
tests/lib/tools/memory_sync/test_delete_discipline.py:219
Methodtest_long_token_masked_to_last_four
(self)
tests/lib/test_credentials.py:4792
Functiontest_lowercase_authorization_header_respected
(respx_mock: MockRouter)
tests/lib/test_google_cloud.py:658
Methodtest_lowercase_multipart_content_type
(self, client_cls: ClientClass)
tests/test_header_case_sensitivity.py:298
Functiontest_make_status_error_sync_async_parity
(status_code: int)
tests/test_client.py:118
Methodtest_managed_agents_routes
(self, sync_client: AnthropicGoogleCloud)
tests/lib/test_google_cloud_live.py:104
Methodtest_managed_agents_routes
(self, async_client: AsyncAnthropicGoogleCloud)
tests/lib/test_google_cloud_live.py:159
Methodtest_mandatory_refresh_failure_raises
(self)
tests/lib/test_credentials.py:1689
Methodtest_mantle_api_key_takes_precedence_over_aws
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_bedrock_mantle.py:152
Methodtest_mantle_middleware_sees_canonical_request
(self, respx_mock: MockRouter)
tests/test_middleware.py:2033
Functiontest_mantle_user_profile_id_paths_are_up_to_date
()
tests/lib/test_platform_resources.py:155
Methodtest_matches_the_first_party_client
(self)
tests/lib/test_bedrock_mantle.py:260
Methodtest_max_content_bytes_bounds_a_streamed_message_too
( self, beta: bool, sync: bool, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:3992
Methodtest_max_content_bytes_is_the_size_bound
( self, source: str, sync: bool, registered: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:3960
Methodtest_max_iterations
(self, snapshot_client: Anthropic)
tests/lib/tools/test_runners.py:353
Functiontest_max_tokens_ends_runner_without_executing_tools_async
(respx_mock: MockRouter)
tests/lib/tools/test_runners.py:938
Functiontest_max_tokens_ends_runner_without_executing_tools_sync
(respx_mock: MockRouter)
tests/lib/tools/test_runners.py:904
Methodtest_mcp_tool_name
(self)
tests/lib/tools/test_mcp_tool.py:302
Methodtest_mcp_tool_no_description
(self)
tests/lib/tools/test_mcp_tool.py:307
Methodtest_mcp_tool_to_dict
(self)
tests/lib/tools/test_mcp_tool.py:291
Methodtest_mcp_tool_with_cache_control
(self)
tests/lib/tools/test_mcp_tool.py:312
Functiontest_member_call_roundtrip_async
( async_client: AsyncAnthropic, respx_mock: MockRouter, async_navigate: BetaAsyncFunctionTool[Any] )
tests/lib/tools/toolsets/test_runner.py:515
Functiontest_member_call_routes_by_family_not_name_sync
( client: Anthropic, respx_mock: MockRouter, navigate: BetaFunctionTool[Any] )
tests/lib/tools/toolsets/test_runner.py:171
Functiontest_member_calls_round_trip_through_the_async_runner
( respx_mock: MockRouter, async_client: AsyncAnthropic )
tests/lib/tools/toolsets/test_computer_runner.py:285
Functiontest_member_calls_round_trip_through_the_async_runner
( respx_mock: MockRouter, async_client: AsyncAnthropic )
tests/lib/tools/toolsets/test_browser_runner.py:108
Functiontest_member_calls_round_trip_through_the_runner
(respx_mock: MockRouter, client: Anthropic)
tests/lib/tools/toolsets/test_computer_runner.py:68
Functiontest_member_calls_round_trip_through_the_runner
( respx_mock: MockRouter, client: Anthropic, async_client: AsyncAnthropic, flavour: str )
tests/lib/tools/toolsets/test_browser_runner.py:66
← previousnext →6,501–6,600 of 12,274, ranked by callers