MCPcopy Create free account

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

Functions13,873 in github.com/anthropics/anthropic-sdk-python

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:679
Functiontest_another_clients_call_with_no_permission_is_yielded_when_an_idle_lists_it
()
tests/lib/tools/test_session_runner.py:834
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:46
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
Functiontest_api_key_and_custom_credentials_of_the_client_are_never_sent
(monkeypatch: pytest.MonkeyPatch)
tests/lib/environments/test_worker.py:786
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:408
Functiontest_api_key_auth_async
(respx_mock: MockRouter)
tests/lib/test_bedrock.py:426
Functiontest_api_key_env_mutual_exclusion
(monkeypatch: t.Any)
tests/lib/test_bedrock.py:473
Functiontest_api_key_from_env
(monkeypatch: t.Any)
tests/lib/test_bedrock.py:442
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
Functiontest_api_key_mode_no_region_with_base_url
API key mode should work without a region if base_url is provided.
tests/lib/test_aws.py:382
Methodtest_api_key_mode_returns_bearer_auth_header
(self)
tests/lib/test_bedrock_mantle.py:236
Methodtest_api_key_mode_sends_foundry_key_as_x_api_key
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_azure.py:256
Methodtest_api_key_moved_to_x_api_key_by_hand
(self, client_cls: ClientClass)
tests/test_header_case_sensitivity.py:268
Functiontest_api_key_mutual_exclusion
()
tests/lib/test_bedrock.py:455
Functiontest_api_key_mutual_exclusion_async
()
tests/lib/test_bedrock.py:464
Methodtest_api_key_precedence_preserved
( self, respx_mock: MockRouter, clean_env: pytest.MonkeyPatch, tmp_path: pathlib.Path )
tests/lib/test_credentials.py:3024
Functiontest_api_key_request
(respx_mock: MockRouter)
tests/lib/test_aws.py:419
Functiontest_api_key_request_async
(respx_mock: MockRouter)
tests/lib/test_aws.py:441
Methodtest_api_key_returns_none
(self, clean_env: pytest.MonkeyPatch)
tests/lib/test_credentials.py:2151
Methodtest_appends_the_fallback_credit_beta_to_both_the_original_and_hop_requests
( self, respx_mock: MockRouter )
tests/lib/test_refusal_fallback_streaming.py:349
Methodtest_appends_to_a_helper_tag_already_on_the_request
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:710
Methodtest_appends_to_betas_already_on_the_request
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:682
Functiontest_application_inference_profile
(respx_mock: MockRouter)
tests/lib/test_bedrock.py:222
Functiontest_archive_top_dir_detection
()
tests/lib/tools/test_skills.py:147
Methodtest_arg_takes_precedence_over_env
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:237
Methodtest_arg_takes_precedence_over_env
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:302
Methodtest_arg_takes_precedence_over_env
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:327
Methodtest_arg_takes_precedence_over_env
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:394
Methodtest_arguments_and_the_content_of_the_result_event_are_recorded_in_content_mode
( self, spans: Spans, custom: bool, span_name: str )
tests/lib/tools/test_open_telemetry.py:2202
Methodtest_arguments_are_recorded_as_the_tool_left_them
(self, spans: Spans)
tests/lib/tools/test_open_telemetry.py:2217
Functiontest_array_brackets
(method: str)
tests/test_qs.py:76
Functiontest_array_comma
(method: str)
tests/test_qs.py:57
Functiontest_array_format_controls_file_field_names
( array_format: ArrayFormat, expected_top_level: list[tuple[str, FileTypes]], expected_nested: lis
tests/test_extract_files.py:82
Functiontest_array_repeat
()
tests/test_qs.py:68
Functiontest_array_schema
()
tests/lib/_parse/test_transform.py:185
Functiontest_asks_confirm_before_a_call_runs_while_the_reply_streams
(setup: SetupFactory, family: str)
tests/lib/tools/test_runner_eager_toolsets.py:123
Methodtest_assigned_base_url_takes_every_route
(self, respx_mock: MockRouter)
tests/lib/test_google_cloud.py:1611
Methodtest_assistant_message
(self)
tests/lib/tools/test_mcp_tool.py:187
Methodtest_async_401_for_a_request_with_its_own_credential_keeps_the_cached_token
(self, header: str)
tests/lib/test_credentials.py:3789
Methodtest_async_401_invalidates_and_retries_once
Async client 401 behavior mirrors sync: invalidate the cache and retry the current request once with a freshly minted token.
tests/lib/test_credentials.py:3690
Methodtest_async_401_refreshes_on_the_next_call_when_max_retries_is_zero
(self)
tests/lib/test_credentials.py:3772
Methodtest_async_401_refreshes_when_authorization_was_changed_on_the_request
Async mirror of the sync test.
tests/lib/test_credentials.py:3760
Methodtest_async_aclose_via_context_manager
`async with AsyncAnthropic(...)` exits cleanly and cascades close.
tests/lib/test_credentials.py:3819
Methodtest_async_api_key_mode_sends_foundry_key_as_x_api_key
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_azure.py:284
Methodtest_async_authorized_user_refresh_flow
Async client calling a CredentialsFile(authorized_user) provider: the blocking refresh_token POST runs on the worker thread via asyncify.
tests/lib/test_credentials.py:3644
Functiontest_async_aws_client_in_api_key_mode_sends_only_the_bearer
()
tests/lib/test_scoped_client.py:252
Methodtest_async_azure_ad_token_provider
Test async client with async Azure AD token provider.
tests/lib/test_azure.py:138
Methodtest_async_base_url_from_region
(self)
tests/lib/test_bedrock_mantle.py:353
Methodtest_async_batch_create_starts_its_span_with_the_request_count
( self, beta: bool, respx_mock: MockRouter )
tests/test_open_telemetry.py:2695
Methodtest_async_batch_results_span_covers_the_download
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:1140
Methodtest_async_batches_keep_the_header
( self, send: AsyncSendBatch, async_client: AsyncAnthropicBedrockMantle, respx_mock: MockRouter )
tests/lib/test_bedrock_mantle.py:797
Methodtest_async_batches_send_no_header_when_no_profile_is_set
( self, send: AsyncSendBatch, async_client: AsyncAnthropicBedrockMantle, respx_mock: MockRouter )
tests/lib/test_bedrock_mantle.py:823
Methodtest_async_batches_send_the_client_default_header_unless_the_request_names_one
( self, send: AsyncSendBatch, user_profile_id: str | Omit, sent: str,
tests/lib/test_bedrock_mantle.py:861
Methodtest_async_bedrock_middleware_sees_canonical_request
(self, respx_mock: MockRouter)
tests/test_middleware.py:1974
← previousnext →5,901–6,000 of 13,873, ranked by callers