MCPcopy Create free account

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

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

Functiontest_add_tools_refuses_a_toolset_and_queues_nothing
( respx_mock: MockRouter, client: Anthropic, async_client: AsyncAnthropic, flavour: str )
tests/lib/tools/toolsets/test_browser_runner.py:189
Functiontest_add_tools_replaces_a_tool_of_the_same_name_straight_away
( sync: bool, client: Anthropic, async_client: AsyncAnthropic, respx_mock: MockRouter )
tests/lib/tools/test_runners.py:1895
Functiontest_add_tools_sends_a_raw_toolset_definition_of_another_family
( respx_mock: MockRouter, client: Anthropic, async_client: AsyncAnthropic, flavour: str )
tests/lib/tools/toolsets/test_browser_runner.py:290
Functiontest_add_tools_sends_the_definition_with_the_next_request
( sync: bool, client: Anthropic, async_client: AsyncAnthropic, respx_mock: MockRouter )
tests/lib/tools/test_runners.py:1684
Methodtest_add_without_the_named_field_in_its_response
( self, body: dict[str, Any], spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:7715
Methodtest_advisory_caller_skips_when_refresh_in_flight
A caller in the advisory window does NOT start a second refresh and does NOT wait on a running one — it just returns the cached token.
tests/lib/test_credentials.py:1869
Methodtest_advisory_failure_serves_cached_and_mandatory_failure_raises
(self)
tests/lib/test_credentials.py:3881
Methodtest_advisory_refresh_backoff_after_failure
After an advisory refresh failure, subsequent advisory callers within ADVISORY_REFRESH_BACKOFF_SECONDS reuse the cached token instead
tests/lib/test_credentials.py:2103
Methodtest_advisory_refresh_failure_serves_stale
(self, caplog: pytest.LogCaptureFixture)
tests/lib/test_credentials.py:1667
Methodtest_advisory_refresh_success
(self)
tests/lib/test_credentials.py:1658
Methodtest_agent_id_is_the_conventions_attribute
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:7631
Functiontest_agent_message_accepts_none_snapshot
()
tests/lib/sessions/test_accumulate.py:153
Functiontest_agent_message_replaces_the_preview_with_a_copy_of_the_final_event
()
tests/lib/sessions/test_accumulate.py:137
Functiontest_agent_toolset_filter_and_extend
The list returned by beta_agent_toolset_20260401 is a plain list that callers can filter or extend.
tests/lib/tools/test_agent_toolset.py:194
Functiontest_agent_toolset_names_and_type
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:187
Methodtest_aiohttp_refused_connection_is_not_a_timeout
(self, async_client: AsyncAnthropic)
tests/test_client.py:3022
Functiontest_aiter_work_backs_off_on_transient_error
(status: int)
tests/lib/environments/test_poller_method.py:445
Functiontest_aiter_work_calls_stop_when_body_raises
()
tests/lib/environments/test_poller_method.py:432
Functiontest_aiter_work_drain_auto_stop_false_dispatch_shape
()
tests/lib/environments/test_poller_method.py:483
Functiontest_aiter_work_logs_idle_polling
(monkeypatch: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture)
tests/lib/environments/test_poller_method.py:400
Functiontest_aiter_work_propagates_non_api_error_instead_of_retrying
Async counterpart: a non-API/non-transport error propagates instead of being retried forever.
tests/lib/environments/test_poller_method.py:471
Functiontest_aiter_work_stop_conflict_is_silent
(caplog: pytest.LogCaptureFixture)
tests/lib/environments/test_poller_method.py:455
Functiontest_aiter_work_threads_extra_headers_into_force_stop
()
tests/lib/environments/test_poller_method.py:553
Functiontest_aiter_work_threads_extra_headers_into_poll_ack_stop
()
tests/lib/environments/test_poller_method.py:538
Functiontest_aiter_work_yields_acks_and_stops_one_item
()
tests/lib/environments/test_poller_method.py:416
Functiontest_aliases
()
tests/test_models.py:186
Functiontest_all_blank_upload_roots_report_no_configured_roots
()
tests/lib/tools/toolsets/test_security.py:296
Methodtest_all_none_output_config_subfields_on_a_missing_original_add_nothing
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:496
Methodtest_all_of_the_async_runners_code_runs_in_the_tool_runner_span
( self, stream: bool, spans: Spans, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/lib/tools/test_open_telemetry.py:1320
Methodtest_all_of_the_runners_code_runs_in_the_tool_runner_span
( self, stream: bool, spans: Spans, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/lib/tools/test_open_telemetry.py:1281
Functiontest_allof
()
tests/lib/_parse/test_transform.py:133
Functiontest_allow_after_end_turn_resumes_idle_stop
The `allow` twin of the test above: the released call runs and posts its result, nothing else arrives, and the runner must still stop on its own.
tests/lib/tools/test_session_runner.py:1165
Functiontest_allowed_call_of_terminated_thread_does_not_start_idle_countdown_after_failed_history_read
An allowed call is running or queued when its thread terminates, and the history read fails. The end of the call must not start the countdown that
tests/lib/tools/test_session_runner.py:1665
Functiontest_ambient_first_party_credentials_do_not_warn
( client_cls: _AWSClientClass, monkeypatch: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture )
tests/lib/test_aws.py:249
Methodtest_an_absent_output_config_keeps_the_original
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:448
Functiontest_an_approval_covers_the_last_report_and_the_page_is_not_read_again
()
tests/lib/tools/toolsets/test_confirm.py:164
Functiontest_an_async_browser_state_on_the_sync_class_is_a_contract_error
()
tests/lib/tools/toolsets/test_pipeline.py:955
Functiontest_an_async_confirm_that_raises_refuses_the_call_and_a_tool_error_is_relayed
()
tests/lib/tools/toolsets/test_confirm.py:283
Functiontest_an_async_execute_override_on_the_sync_class_is_a_contract_error
()
tests/lib/tools/toolsets/test_computer_pipeline.py:429
Functiontest_an_async_execute_override_on_the_sync_class_is_a_contract_error
()
tests/lib/tools/toolsets/test_pipeline.py:990
Functiontest_an_async_execute_override_serves_every_member_and_turns_members_off_with_configs
()
tests/lib/tools/toolsets/test_interface.py:358
Functiontest_an_async_file_policy_hides_the_path_on_the_async_class_too
()
tests/lib/tools/toolsets/test_pipeline.py:296
Functiontest_an_async_member_on_the_sync_class_is_a_contract_error
()
tests/lib/tools/toolsets/test_interface.py:241
Functiontest_an_async_member_on_the_sync_class_is_a_contract_error
()
tests/lib/tools/toolsets/test_computer_interface.py:148
Functiontest_an_async_new_tab_whose_tab_is_not_the_active_one_fails_too
()
tests/lib/tools/toolsets/test_pipeline.py:776
Functiontest_an_async_pure_action_may_return_one_line_too
()
tests/lib/tools/toolsets/test_pipeline.py:140
Functiontest_an_async_unexpected_exception_is_logged_with_folded_names_and_answered_with_bounded_text
( caplog: pytest.LogCaptureFixture, )
tests/lib/tools/toolsets/test_runnable.py:237
Functiontest_an_edit_made_after_a_lost_upload_response_still_reaches_the_server
(tmp_path: Path)
tests/lib/tools/memory_sync/test_lost_response.py:59
Functiontest_an_edit_written_mid_sync_still_survives_a_remote_delete
The directory scan saw the file unedited; an edit is written while the server listing is in flight. The removal must re-read the file instead
tests/lib/tools/memory_sync/test_keep_only_copy.py:129
Functiontest_an_edited_file_survives_a_remote_delete_and_is_re_created
( tmp_path: Path, caplog: pytest.LogCaptureFixture )
tests/lib/tools/memory_sync/test_keep_only_copy.py:32
Methodtest_an_emitted_start_leaves_the_delta_untouched
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:1195
Functiontest_an_emptied_folder_issues_no_deletes_and_is_repopulated
( tmp_path: Path, caplog: pytest.LogCaptureFixture, clock: Clock )
tests/lib/tools/memory_sync/test_folder_trust.py:71
Functiontest_an_emptied_folder_with_the_marker_left_behind_issues_no_deletes
`rm <mount>/*`: shell globs skip dotfiles, so the marker survives the wipe — an intact marker alone must not clear a folder whose every memory
tests/lib/tools/memory_sync/test_folder_trust.py:95
Methodtest_an_empty_chain_disables_the_middleware
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:561
Methodtest_an_empty_chain_passes_the_stream_through_untouched
(self, caplog: pytest.LogCaptureFixture)
tests/lib/test_refusal_fallback_streaming.py:901
Methodtest_an_empty_request_option_clears_the_threads
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:1255
Functiontest_an_empty_text_block_is_dropped_from_error_content_so_the_placeholder_applies
()
tests/lib/tools/toolsets/test_runnable.py:135
Functiontest_an_enabled_the_types_do_not_allow_fails_closed_if_it_gets_past_them
()
tests/lib/tools/toolsets/test_pipeline.py:447
Methodtest_an_entry_that_sets_thinking_overrides_between_tools
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:371
Methodtest_an_equal_copy_of_system_and_tools_continues_the_thread
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:2085
Methodtest_an_exception_inside_the_stream_block_records_the_partial_reply
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:1698
Functiontest_an_execute_only_subclass_serves_every_member_and_turns_members_off_with_configs
()
tests/lib/tools/toolsets/test_pipeline.py:467
Functiontest_an_execute_only_subclass_serves_every_member_and_turns_members_off_with_configs
()
tests/lib/tools/toolsets/test_interface.py:118
Functiontest_an_execute_only_subclass_serves_every_member_and_turns_members_off_with_configs
()
tests/lib/tools/toolsets/test_computer_interface.py:93
Functiontest_an_execute_override_wraps_dispatch_and_the_pipeline_wraps_the_override
()
tests/lib/tools/toolsets/test_pipeline.py:968
Functiontest_an_execute_override_wraps_dispatch_on_the_async_class
()
tests/lib/tools/toolsets/test_pipeline.py:1309
Methodtest_an_explicit_none_entry_field_unsets_it_on_the_retry
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:341
Methodtest_an_explicit_none_output_config_unsets_it_whole
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:435
Functiontest_an_explicit_none_policy_refuses_navigate_on_both_classes
()
tests/lib/tools/toolsets/test_enforcement.py:166
Methodtest_an_http_failed_hop_is_skipped_and_the_unredeemed_token_carries_to_the_next_entry
( self, respx_mock: MockRouter, caplog: pytest.LogCaptureFixture )
tests/lib/test_refusal_fallback_streaming.py:818
Methodtest_an_organization_method_has_a_span_and_its_email_query_needs_content_mode
( self, content_mode: str, sync: bool, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:3239
Functiontest_an_oversized_file_is_skipped_until_it_shrinks
A file the server refuses as too large is warned once and skipped — not retried while unchanged, never blocking the other files — and syncs as
tests/lib/tools/memory_sync/test_memory_sync.py:247
Functiontest_an_unclean_mount_path_fails_the_download
(tmp_path: Path, bad: str)
tests/lib/tools/memory_sync/test_memory_sync.py:391
Functiontest_an_undeclared_key_named_after_a_model_attribute_is_dropped
( flavour: type[FakeBrowser] | type[AsyncFakeBrowser], )
tests/lib/tools/toolsets/test_pipeline.py:376
Functiontest_an_unexpected_exception_is_logged_with_folded_names_and_answered_with_bounded_text
( caplog: pytest.LogCaptureFixture, )
tests/lib/tools/toolsets/test_runnable.py:83
Functiontest_an_unreadable_subdirectory_fails_the_pass_instead_of_reading_as_deletions
Files under a directory the scan cannot enter are not treated as deleted.
tests/lib/tools/memory_sync/test_delete_discipline.py:170
Functiontest_an_unwritable_mount_path_fails_the_download
A mount the host cannot provide is an environment failure: the download raises loudly (failing the work item) instead of degrading to a session
tests/lib/tools/memory_sync/test_memory_sync.py:369
Functiontest_an_upload_path_outside_every_root_is_refused_without_touching_the_filesystem
( tmp_path: Path, monkeypatch: pytest.MonkeyPatch )
tests/lib/tools/toolsets/test_security.py:129
Functiontest_an_upload_that_loses_the_race_pulls_the_winner_next_sync
The server changes between this sync's list and its update: the content_sha256 precondition rejects the push (409), and the next sync applies
tests/lib/tools/memory_sync/test_memory_sync.py:296
Functiontest_annotated_types
()
tests/test_models.py:660
Functiontest_another_writers_edit_after_a_lost_upload_response_still_wins
( tmp_path: Path, caplog: pytest.LogCaptureFixture )
tests/lib/tools/memory_sync/test_lost_response.py:222
Methodtest_anthropic_project_env_beats_google_cloud_project
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_google_cloud.py:338
Methodtest_any_other_failed_hop_is_not_resent
( self, respx_mock: MockRouter, entry: BetaFallbackParam, speed: Literal["stan
tests/lib/test_refusal_fallback.py:870
Methodtest_any_other_failed_hop_is_not_resent
( self, respx_mock: MockRouter, entry: BetaFallbackParam, speed: Literal["stan
tests/lib/test_refusal_fallback.py:967
Methodtest_any_other_failed_hop_is_not_resent
( self, respx_mock: MockRouter, entry: BetaFallbackParam, speed: Literal["stan
tests/lib/test_refusal_fallback_streaming.py:1680
Methodtest_any_other_failed_hop_is_not_resent
( self, respx_mock: MockRouter, entry: BetaFallbackParam, speed: Literal["stan
tests/lib/test_refusal_fallback_streaming.py:1931
Functiontest_anyof_schema
()
tests/lib/_parse/test_transform.py:45
Functiontest_api_exclude
(send: Send)
tests/test_prepare.py:458
Methodtest_api_key_and_auth_token_rejected
(self)
tests/lib/test_google_cloud.py:349
Methodtest_api_key_and_auth_token_rejected
(self)
tests/lib/test_google_cloud.py:1311
Methodtest_api_key_arg_beats_explicit_creds
api_key constructor arg takes highest precedence.
tests/lib/test_aws_auth.py:133
Methodtest_api_key_arg_returns_false
(self)
tests/lib/test_aws_auth.py:41
Functiontest_api_key_arg_takes_precedence_over_env
(monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws.py:329
Methodtest_api_key_arg_uses_api_key_mode
(self)
tests/lib/test_bedrock_mantle.py:219
Functiontest_api_key_auth
(respx_mock: MockRouter)
tests/lib/test_bedrock.py:407
Functiontest_api_key_auth_async
(respx_mock: MockRouter)
tests/lib/test_bedrock.py:425
Functiontest_api_key_env_mutual_exclusion
(monkeypatch: t.Any)
tests/lib/test_bedrock.py:472
Functiontest_api_key_from_env
(monkeypatch: t.Any)
tests/lib/test_bedrock.py:441
Methodtest_api_key_header_override_does_not_send_two_credentials
(self, client_cls: ClientClass)
tests/test_header_case_sensitivity.py:100
Functiontest_api_key_mode_no_region_no_base_url_errors
API key mode without region or base_url should error.
tests/lib/test_aws.py:389
← previousnext →5,301–5,400 of 12,431, ranked by callers