Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/anthropics/anthropic-sdk-python
/ functions
Functions
9,455 in github.com/anthropics/anthropic-sdk-python
⨍
Functions
9,455
◇
Types & classes
3,151
↳
Endpoints
25
Function
test_a_dangling_symlink_in_a_root_is_judged_by_its_target_and_a_cycle_resolves_as_written
A symlink under a root that names a missing file elsewhere resolves to that target, so the root check refuses it; a symlink cycle has no target an
tests/lib/tools/toolsets/test_security.py:105
Function
test_a_deleted_folder_issues_no_deletes_and_is_rebuilt
rm -rf of the whole folder between syncs: the next sync must not read the emptiness as "the agent deleted everything" and wipe the server.
tests/lib/tools/memory_sync/test_folder_trust.py:41
Function
test_a_deletion_made_after_a_lost_upload_response_still_reaches_the_server
(tmp_path: Path)
tests/lib/tools/memory_sync/test_lost_response.py:134
Function
test_a_dismissed_dialog_is_a_line_of_text_on_the_async_class
()
tests/lib/tools/toolsets/test_pipeline.py:1438
Function
test_a_dismissed_dialog_is_a_line_of_text_with_its_message_capped
()
tests/lib/tools/toolsets/test_pipeline.py:814
Function
test_a_download_change_without_a_url_is_the_drivers_bug
()
tests/lib/tools/toolsets/test_enforcement.py:198
Function
test_a_download_path_is_exposed_on_the_async_class_only_when_the_file_policy_answers_true
()
tests/lib/tools/toolsets/test_pipeline.py:1383
Function
test_a_download_path_is_exposed_only_when_the_file_policy_answers_true
()
tests/lib/tools/toolsets/test_pipeline.py:230
Function
test_a_download_path_outside_the_download_dir_is_hidden_without_touching_the_filesystem
( tmp_path: Path, monkeypatch: pytest.MonkeyPatch )
tests/lib/tools/toolsets/test_security.py:155
Function
test_a_driver_error_reaches_the_model_as_text_and_a_refusal_is_relayed
()
tests/lib/tools/toolsets/test_computer_pipeline.py:224
Function
test_a_driver_exception_reads_as_its_type_and_message
(raised: Exception, expected: str)
tests/lib/tools/toolsets/test_computer_pipeline.py:291
Function
test_a_drivers_error_text_reaches_the_model_as_written_and_cut_to_the_field_limit
()
tests/lib/tools/toolsets/test_enforcement.py:372
Function
test_a_duration_is_not_bounded_by_the_sdk
()
tests/lib/tools/toolsets/test_pipeline.py:153
Method
test_a_failed_fallback_request_replays_the_refusal_and_logs_an_error
( self, respx_mock: MockRouter, caplog: pytest.LogCaptureFixture )
tests/lib/test_refusal_fallback_streaming.py:447
Function
test_a_failed_fetch_keeps_the_old_state_and_the_next_sync_retries
(tmp_path: Path)
tests/lib/tools/memory_sync/test_two_pass.py:110
Function
test_a_failed_local_removal_never_re_uploads_the_deleted_memory
The server deleted the memory; removing our copy fails. The baseline must stay put — dropping it would read the leftover file as a new local file
tests/lib/tools/memory_sync/test_memory_sync.py:593
Function
test_a_failed_member_stops_the_rest_of_the_turns_members_but_not_function_tools_async
( async_client: AsyncAnthropic, respx_mock: MockRouter, async_navigate: BetaAsyncFunctionTool[Any] )
tests/lib/tools/toolsets/test_runner.py:552
Function
test_a_failed_member_stops_the_rest_of_the_turns_members_but_not_function_tools_sync
( client: Anthropic, respx_mock: MockRouter, navigate: BetaFunctionTool[Any] )
tests/lib/tools/toolsets/test_runner.py:420
Function
test_a_failed_pull_leaves_the_old_file_and_retries
(tmp_path: Path, monkeypatch: pytest.MonkeyPatch)
tests/lib/tools/memory_sync/test_memory_sync.py:568
Function
test_a_failed_re_read_does_not_resurrect_a_server_deleted_memory
The re-read before removal can fail (a transient I/O error). That must mean "retry next sync", not "file gone": dropping the entry would make
tests/lib/tools/memory_sync/test_keep_only_copy.py:160
Function
test_a_failed_upload_keeps_the_local_edit_and_retries
(tmp_path: Path)
tests/lib/tools/memory_sync/test_memory_sync.py:546
Function
test_a_failure_halts_the_later_computer_actions_of_the_turn_with_the_computer_wording
( respx_mock: MockRouter, client: Anthropic )
tests/lib/tools/toolsets/test_computer_runner.py:107
Method
test_a_fallback_request_that_raises_replays_the_refusal
( self, respx_mock: MockRouter, caplog: pytest.LogCaptureFixture )
tests/lib/test_refusal_fallback_streaming.py:507
Function
test_a_file_already_holding_the_remote_content_is_adopted_without_a_fetch
(tmp_path: Path)
tests/lib/tools/memory_sync/test_two_pass.py:59
Function
test_a_file_policy_hook_may_return_any_iterable
()
tests/lib/tools/toolsets/test_enforcement.py:265
Function
test_a_file_policy_hook_may_return_any_iterable_on_the_async_class
()
tests/lib/tools/toolsets/test_enforcement.py:536
Function
test_a_file_policy_that_fails_refuses_the_upload_and_the_call_is_still_observed
(tmp_path: Path)
tests/lib/tools/toolsets/test_enforcement.py:341
Function
test_a_file_policy_that_fails_refuses_the_upload_on_the_async_class
(tmp_path: Path)
tests/lib/tools/toolsets/test_enforcement.py:500
Function
test_a_file_that_reappears_is_not_deleted_and_leaves_pending
(tmp_path: Path, clock: Clock)
tests/lib/tools/memory_sync/test_delete_discipline.py:65
Function
test_a_flush_cut_off_part_way_logs_how_many_files_it_had_not_uploaded
( tmp_path: Path, caplog: pytest.LogCaptureFixture )
tests/lib/tools/memory_sync/test_final_flush.py:128
Function
test_a_folder_destroyed_mid_sync_sends_no_deletes
The directory scan saw an intact folder, then the folder vanished while the server listing was in flight: the re-check just before the delete
tests/lib/tools/memory_sync/test_delete_discipline.py:152
Function
test_a_folder_wiped_after_a_lost_create_response_is_rebuilt_not_read_as_deletions
(tmp_path: Path)
tests/lib/tools/memory_sync/test_lost_response.py:153
Function
test_a_folder_wiped_again_mid_recovery_is_rebuilt_by_the_next_sync
A re-download writes the marker first and the memories after it; a second rm -rf between those writes must not leave memories on disk without
tests/lib/tools/memory_sync/test_folder_trust.py:331
Function
test_a_folder_wiped_while_a_locally_deleted_memory_is_being_restored_is_rebuilt
A file deleted locally but changed on the server is restored by the next sync; an rm -rf that lands while that restore is downloading must lea
tests/lib/tools/memory_sync/test_folder_trust.py:300
Function
test_a_folder_wiped_while_a_pull_is_in_flight_is_rebuilt_not_distrusted
rm -rf lands between a sync's scan and its content write: the write must not bring the folder back without its marker, or every later sync rea
tests/lib/tools/memory_sync/test_folder_trust.py:266
Function
test_a_function_call_that_the_caller_defers_holds_no_other_call
(setup: SetupFactory)
tests/lib/tools/test_runner_eager_toolsets.py:233
Function
test_a_function_tool_appended_to_the_list_in_place_is_sent_with_the_next_request
( respx_mock: MockRouter, client: Anthropic, async_client: AsyncAnthropic, flavour: str )
tests/lib/tools/toolsets/test_browser_runner.py:408
Function
test_a_held_call_named_like_a_toolset_with_no_toolset_name_holds_that_toolsets_later_calls
( setup: SetupFactory, )
tests/lib/tools/test_runner_eager_toolsets.py:335
Function
test_a_held_change_and_a_replayed_one_give_way_to_the_newest_for_that_download
()
tests/lib/tools/toolsets/test_pipeline.py:698
Method
test_a_history_seam_without_a_state_does_not_pin
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:1187
Function
test_a_hook_refusal_is_cut_to_the_field_limit_and_stays_the_cause
()
tests/lib/tools/toolsets/test_refusals.py:135
Method
test_a_hop_http_error_surfaces_to_the_app
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:508
Method
test_a_hop_whose_request_raises_is_skipped_and_the_unredeemed_token_carries
( self, respx_mock: MockRouter, caplog: pytest.LogCaptureFixture )
tests/lib/test_refusal_fallback_streaming.py:906
Function
test_a_key_the_schema_does_not_declare_reaches_the_driver_and_confirm
( flavour: type[FakeBrowser] | type[AsyncFakeBrowser], )
tests/lib/tools/toolsets/test_pipeline.py:354
Function
test_a_legal_mount_path_is_honored_and_an_unclean_one_is_refused
mount_path is the location the agent's system prompt names. A clean absolute one is honored verbatim, and dispose removes it when the download
tests/lib/tools/memory_sync/test_memory_sync.py:351
Function
test_a_line_that_folds_to_nothing_renders_as_the_acknowledgment_alone
()
tests/lib/tools/toolsets/test_computer_pipeline.py:123
Function
test_a_line_that_folds_to_nothing_renders_as_the_acknowledgment_alone_on_the_async_class
()
tests/lib/tools/toolsets/test_computer_pipeline.py:132
Method
test_a_list_already_on_the_delta_is_kept
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:1123
Function
test_a_local_deletion_is_confirmed_before_it_reaches_the_server
(tmp_path: Path, clock: Clock)
tests/lib/tools/memory_sync/test_delete_discipline.py:43
Function
test_a_lone_surrogate_in_error_text_becomes_the_replacement_character
()
tests/lib/tools/toolsets/test_runnable.py:119
Function
test_a_long_reported_tab_url_is_cut_to_the_field_limit_and_its_controls_folded
()
tests/lib/tools/toolsets/test_enforcement.py:207
Function
test_a_malformed_report_is_a_contract_error_on_the_async_class_too
()
tests/lib/tools/toolsets/test_pipeline.py:574
Function
test_a_marker_from_an_older_format_no_longer_clears_the_folder
The marker carries a format version so an SDK upgrade can retire every folder written before it: a marker in the old format (the bare store id)
tests/lib/tools/memory_sync/test_folder_trust.py:244
Function
test_a_member_without_fields_takes_an_empty_object
()
tests/lib/tools/toolsets/test_pipeline.py:507
Function
test_a_memory_deleted_between_listing_and_fetch_waits_for_the_next_sync
(tmp_path: Path)
tests/lib/tools/memory_sync/test_two_pass.py:129
Function
test_a_memory_deleted_between_the_listing_and_the_update_is_re_created
An update that meets a 404 re-creates the memory in the same pass.
tests/lib/tools/memory_sync/test_keep_only_copy.py:107
Function
test_a_new_tab_result_carries_only_its_own_tab_opened_and_holds_a_popups_for_the_next_block
()
tests/lib/tools/toolsets/test_pipeline.py:720
Function
test_a_new_tab_result_gets_a_tab_opened_when_the_driver_reported_none
()
tests/lib/tools/toolsets/test_pipeline.py:755
Function
test_a_new_tab_result_that_is_not_a_tab_entry_still_renders_the_block
()
tests/lib/tools/toolsets/test_pipeline.py:588
Function
test_a_new_tab_whose_tab_is_not_the_active_one_fails_and_its_tab_opened_waits_for_the_next_block
()
tests/lib/tools/toolsets/test_pipeline.py:764
Method
test_a_non_refusal_stream_is_passed_through_untouched
( self, respx_mock: MockRouter, caplog: pytest.LogCaptureFixture )
tests/lib/test_refusal_fallback_streaming.py:570
Function
test_a_null_configs_entry_leaves_the_member_at_its_defaults_and_goes_to_the_api_as_given
()
tests/lib/tools/toolsets/test_interface.py:149
Function
test_a_null_configs_entry_leaves_the_member_at_its_defaults_and_goes_to_the_api_as_given
()
tests/lib/tools/toolsets/test_computer_interface.py:121
Method
test_a_partial_of_only_thinking_falls_back_to_the_same_body_form
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:1551
Method
test_a_pinned_continuation_seams_from_the_pinned_model
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:263
Method
test_a_pinned_state_starts_on_the_pinned_entry_and_chains_past_it
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:647
Function
test_a_plain_execute_override_on_the_async_class_is_a_contract_error
()
tests/lib/tools/toolsets/test_computer_pipeline.py:439
Function
test_a_plain_execute_override_on_the_async_class_is_a_contract_error
()
tests/lib/tools/toolsets/test_pipeline.py:1001
Function
test_a_policy_that_raises_something_else_refuses_with_the_sdks_text_and_logs
( caplog: pytest.LogCaptureFixture, )
tests/lib/tools/toolsets/test_enforcement.py:107
Function
test_a_policy_that_raises_something_else_refuses_with_the_sdks_text_and_logs_on_the_async_class
( caplog: pytest.LogCaptureFixture, )
tests/lib/tools/toolsets/test_enforcement.py:471
Function
test_a_predicate_shaped_or_async_policy_on_the_sync_class_is_a_contract_error
()
tests/lib/tools/toolsets/test_enforcement.py:127
Function
test_a_pure_action_may_return_one_line_the_model_reads_after_the_acknowledgment
()
tests/lib/tools/toolsets/test_pipeline.py:117
Function
test_a_pure_action_renders_its_acknowledgment_then_the_line_it_returned
()
tests/lib/tools/toolsets/test_computer_pipeline.py:88
Function
test_a_raised_exception_reads_as_its_type_and_message_only
()
tests/lib/tools/toolsets/test_enforcement.py:393
Function
test_a_raised_exception_reads_the_same_on_the_function_tool_and_toolset_paths
(exc: Exception, text: str)
tests/lib/tools/toolsets/test_runnable.py:151
Function
test_a_raw_definition_is_sent_as_given_and_never_run
( sync: bool, client: Anthropic, async_client: AsyncAnthropic, respx_mock: MockRouter )
tests/lib/tools/test_runners.py:1999
Function
test_a_read_only_pull_over_a_local_edit_is_warned
Read-only stores always take the server version, but overwriting a local edit must leave a trace instead of happening silently.
tests/lib/tools/memory_sync/test_keep_only_copy.py:144
Function
test_a_read_only_store_keeps_the_edited_file_without_pushing
( tmp_path: Path, caplog: pytest.LogCaptureFixture )
tests/lib/tools/memory_sync/test_keep_only_copy.py:62
Function
test_a_recovery_re_download_clears_pending_deletes
The re-download rebuilt the disk, so an absence observed before it says nothing about the rebuilt folder.
tests/lib/tools/memory_sync/test_delete_discipline.py:196
Function
test_a_refusal_that_says_nothing_about_the_content_is_retried_next_sync
Anything but a content refusal is retried by the next sync.
tests/lib/tools/memory_sync/test_memory_sync.py:274
Method
test_a_refusal_without_a_prefill_claim_falls_back_to_shape_a
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:353
Function
test_a_refused_edit_survives_a_remote_delete_without_a_retry
The server already refused this content, so the remote delete neither removes the file nor triggers a re-create the server would refuse again.
tests/lib/tools/memory_sync/test_keep_only_copy.py:87
Method
test_a_refused_hop_splices_its_partial_and_chains_to_the_next_entry
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:713
Method
test_a_refused_hop_splices_its_partial_and_chains_to_the_next_entry
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:1640
Method
test_a_refused_hop_without_a_prefill_claim_drops_its_partial_from_the_next_request
( self, respx_mock: MockRouter )
tests/lib/test_refusal_fallback_streaming.py:763
Function
test_a_refused_navigation_is_one_line_of_text_never_the_url
()
tests/lib/tools/toolsets/test_pipeline.py:930
Function
test_a_refused_navigation_is_one_line_of_text_on_the_async_class
()
tests/lib/tools/toolsets/test_pipeline.py:1468
Function
test_a_removed_tool_added_back_while_handling_a_call_to_it_is_run
( sync: bool, client: Anthropic, async_client: AsyncAnthropic, respx_mock: MockRouter )
tests/lib/tools/test_runners.py:1963
Function
test_a_removed_tool_added_back_while_handling_the_compaction_response_is_run
( sync: bool, client: Anthropic, async_client: AsyncAnthropic, respx_mock: MockRouter )
tests/lib/tools/test_runners.py:2122
Function
test_a_removed_tool_stays_removed_when_its_removal_block_leaves_the_history
( sync: bool, removed: str, client: Anthropic, async_client: AsyncAnthropic, respx_mock: MockRouter )
tests/lib/tools/test_runners.py:1797
Function
test_a_report_missing_a_field_the_sdk_reads_is_the_drivers_contract_error_not_the_models
( fields: dict[str, Any], )
tests/lib/tools/toolsets/test_pipeline.py:558
Function
test_a_reported_url_is_folded_to_one_line_and_cut_to_the_field_limit_and_nothing_else
()
tests/lib/tools/toolsets/test_pipeline.py:874
Function
test_a_retry_whose_response_is_lost_is_remembered_too
(tmp_path: Path)
tests/lib/tools/memory_sync/test_lost_response.py:90
Function
test_a_screenshot_renders_as_one_image_block
()
tests/lib/tools/toolsets/test_computer_pipeline.py:62
Method
test_a_seam_only_assistant_turn_is_dropped_whole
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:1222
Function
test_a_send_is_forgotten_once_a_later_sync_has_seen_the_server
A remembered send must not outlive the next completed sync: kept longer, it would mistake another writer's identical bytes for this sync's upload
tests/lib/tools/memory_sync/test_lost_response.py:243
Method
test_a_separate_conversation_is_unaffected_by_another_state
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:195
Function
test_a_single_local_deletion_with_the_marker_intact_still_propagates
(tmp_path: Path, clock: Clock)
tests/lib/tools/memory_sync/test_folder_trust.py:171
Function
test_a_single_path_string_is_a_config_error
`Sequence[str]` is structurally satisfied by `str`, so this type-checks clean. Iterating one would walk characters: the `"/"` element is a parent
tests/lib/tools/toolsets/test_security.py:95
Function
test_a_store_directory_that_already_exists_is_refused
Nothing but a dead run leaves a folder at the store's path. Syncing into it would fold that run's debris into the customer's store, so refuse — an
tests/lib/tools/memory_sync/test_memory_sync.py:429
← previous
next →
3,901–4,000 of 9,455, ranked by callers