MCPcopy Create free account

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

Functions14,068 in github.com/anthropics/anthropic-sdk-python

Functiontest_extract_type_var_generic_subclass
()
tests/test_utils/test_typing.py:38
Functiontest_extract_type_var_generic_subclass_different_ordering_multiple
()
tests/test_utils/test_typing.py:67
Functiontest_extract_type_var_generic_subclass_multiple
()
tests/test_utils/test_typing.py:58
Functiontest_extract_type_var_multiple
()
tests/test_utils/test_typing.py:49
Methodtest_failed_call_ends_the_loop_with_its_error
(self, spans: Spans, respx_mock: MockRouter)
tests/lib/tools/test_open_telemetry.py:901
Functiontest_failed_compaction_request_is_not_retried_and_frees_the_messages_async
(respx_mock: MockRouter)
tests/lib/tools/test_runners.py:3191
Functiontest_failed_compaction_request_is_not_retried_and_frees_the_messages_sync
(respx_mock: MockRouter)
tests/lib/tools/test_runners.py:3170
Functiontest_failed_connection_is_retried_with_backoff_before_anything_runs
( kind: str, status: int | str, jitter: float, attempts: list[float] )
tests/lib/tools/test_session_runner.py:1414
Methodtest_failed_create_has_no_id
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:7460
Functiontest_failed_heartbeat_is_repeated_with_backoff
(fault: Fault, jitter: float, times: list[float])
tests/lib/environments/test_worker.py:255
Functiontest_failed_poll_is_repeated_with_backoff
(sync: bool, fault: Fault)
tests/lib/environments/test_poller.py:55
Functiontest_failed_post_is_retried_past_the_retry_window_while_the_runner_is_attached
()
tests/lib/tools/test_session_runner.py:1204
Functiontest_failed_post_is_retried_with_backoff
(status: int | str, jitter: float, attempts: list[float])
tests/lib/tools/test_session_runner.py:1185
Methodtest_failed_read_raises_connection_error
( self, client: Anthropic, error: type[Exception], raised: type[APIConnectionE
tests/test_streaming.py:276
Methodtest_failed_read_raises_connection_error
( self, async_client: AsyncAnthropic, error: type[Exception], raised: type[API
tests/test_streaming.py:352
Methodtest_failed_replay_clears_previous_message_id
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:753
Methodtest_failed_send_lets_the_next_send_run
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:1575
Methodtest_failed_send_lets_the_next_send_run
(self, respx_mock: MockRouter)
tests/lib/threads/test_async_beta_threads.py:385
Functiontest_failed_skill_keeps_the_directory_it_would_have_replaced
( tmp_path: Path, async_client: AsyncAnthropic, respx_mock: MockRouter, failing_download: httpx2.Response
tests/lib/tools/test_skills.py:522
Functiontest_failed_stop_is_repeated
(sync: bool, fault: Fault)
tests/lib/environments/test_poller.py:205
Methodtest_failed_streamed_call_ends_the_loop_with_its_error
(self, spans: Spans, respx_mock: MockRouter)
tests/lib/tools/test_open_telemetry.py:918
Methodtest_failed_writeback_after_refresh_does_not_retain_tokens
A refresh that succeeds but fails to persist raises the write error (the refresh token may have rotated server-side) — but the propagating
tests/lib/test_credentials.py:5653
Functiontest_failing_post_delays_only_the_calls_of_its_thread
()
tests/lib/tools/test_session_runner.py:227
Functiontest_failing_result_is_not_retried_after_the_lease_ttl
(stop: Step, last_attempt: float, stops: list[float])
tests/lib/environments/test_worker.py:543
Functiontest_failing_result_is_retried_for_30_seconds_after_a_cancel_or_the_end_of_the_lease
( ending: Step, stopped_at: float )
tests/lib/environments/test_worker.py:566
Functiontest_failure_of_an_item_is_logged_with_its_cause
(caplog: pytest.LogCaptureFixture)
tests/lib/environments/test_worker.py:145
Methodtest_fallback_credit_usage_propagated
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:659
Methodtest_fallback_credit_usage_propagated
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:995
Methodtest_fallback_on_overloaded_error
(self, respx_mock: MockRouter)
tests/test_middleware.py:736
Methodtest_fallback_on_overloaded_error
(self, respx_mock: MockRouter)
tests/test_middleware.py:1610
Methodtest_fallback_relabels_model
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:644
Methodtest_fallback_relabels_model
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:979
Methodtest_fallback_retry_sees_identical_request_state
(self, respx_mock: MockRouter)
tests/test_middleware.py:1280
Methodtest_fallback_retry_sees_identical_request_state
(self, respx_mock: MockRouter)
tests/test_middleware.py:1920
Methodtest_falls_back_to_aws_api_key_env_var
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_bedrock_mantle.py:145
Methodtest_false_keeps_a_span_that_the_sampler_dropped_current_for_the_requests
( self, sync: bool, spans: Spans, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/test_open_telemetry.py:4200
Methodtest_false_sends_no_trace_context_and_keeps_the_span
( self, provider: str, sync: bool, spans: Spans, respx_mock: MockRouter, monkeypatch: pytest.MonkeyPat
tests/test_open_telemetry.py:4171
Functiontest_family_or_type_named_block_without_toolset_name_is_not_a_member_call
( client: Anthropic, async_client: AsyncAnthropic, respx_mock: MockRouter, flavour: str )
tests/lib/tools/toolsets/test_runner.py:328
Functiontest_field_named_cls
()
tests/test_models.py:967
Methodtest_file_input_is_read_when_the_stream_is_entered
( self, respx_mock: MockRouter, tmp_path: pathlib.Path, monkeypatch: pytest.MonkeyPatch )
tests/lib/streaming/test_messages.py:583
Methodtest_file_input_is_read_when_the_stream_is_entered
( self, respx_mock: MockRouter, tmp_path: pathlib.Path, monkeypatch: pytest.MonkeyPatch )
tests/lib/streaming/test_beta_messages.py:715
Methodtest_file_input_markers
(self, respx_mock: MockRouter, client: Anthropic | AsyncAnthropic)
tests/test_prepare.py:793
Functiontest_file_objects_must_read_as_bytes
(send: Send, monkeypatch: pytest.MonkeyPatch)
tests/test_prepare.py:661
Functiontest_file_that_is_missing_after_a_call_stopped_during_a_sync_is_not_deleted
(notes: Path)
tests/lib/tools/memory_sync/test_e2e_memory.py:570
Functiontest_file_that_is_missing_after_a_stopped_call_is_not_deleted
(notes: Path, steps: list[Step])
tests/lib/tools/memory_sync/test_e2e_memory.py:564
Functiontest_file_tools_are_given_the_memory_folders
(notes: Path, access: str, read_only: bool)
tests/lib/tools/memory_sync/test_e2e_memory.py:76
Functiontest_file_tools_confinement_matrix
The full path policy through the real tools: the workdir works, a memory folder mounted outside it works, a read-only memory folder reads but
tests/lib/tools/test_agent_toolset.py:1965
Methodtest_file_upload_tag_is_appended_not_clobbered
(self, client: Anthropic, respx_mock: respx.MockRouter)
tests/lib/test_stainless_helpers.py:85
Methodtest_file_upload_tag_is_appended_not_clobbered
( self, async_client: AsyncAnthropic, respx_mock: respx.MockRouter )
tests/lib/test_stainless_helpers.py:184
Methodtest_file_upload_with_request_copying_middleware
(self, respx_mock: MockRouter, tmp_path: Path)
tests/test_middleware.py:1353
Methodtest_file_value_is_same_reference
(self)
tests/test_files.py:121
Functiontest_file_whose_upload_got_no_response_is_not_deleted_after_a_stopped_call
(notes: Path)
tests/lib/tools/memory_sync/test_e2e_memory.py:580
Functiontest_file_without_a_name_is_sent_unnamed
()
tests/test_files.py:88
Functiontest_files_without_a_marker_are_neither_pushed_nor_pulled_over
Only the marker was deleted (a dotfile cleanup): the remaining files may hold un-pushed edits, so the pass must neither upload them, nor delete by
tests/lib/tools/memory_sync/test_folder_trust.py:149
Functiontest_filestore_async_with_removes_root_only_if_created
(tmp_path: Path)
tests/lib/tools/test_file_store.py:333
Functiontest_filestore_create_root_makes_the_folder_owner_only
(tmp_path: Path)
tests/lib/tools/test_file_store.py:507
Functiontest_filestore_creates_every_parent_owner_only_under_permissive_umask
Every directory the store creates — including intermediate parents, which `mkdir(parents=True, mode=...)` would leave at the umask default — is 0o
tests/lib/tools/test_file_store.py:72
Functiontest_filestore_dispose_removes_the_root_it_created_and_keeps_preexisting
(tmp_path: Path)
tests/lib/tools/test_file_store.py:347
Functiontest_filestore_every_verb_refuses_an_escaping_path
`..` (and absolute) paths raise FileStoreError on every verb; nothing is read or written outside the root.
tests/lib/tools/test_file_store.py:88
Functiontest_filestore_find_symlinks_reports_every_symlink
Listings skip symlinks silently; `find_symlinks` is how a caller sees them.
tests/lib/tools/test_file_store.py:177
Functiontest_filestore_get_does_not_follow_a_symlink_leaf
A symlink at the target is refused on read and replaced — not written through — on put.
tests/lib/tools/test_file_store.py:117
Functiontest_filestore_get_refuses_a_non_regular_file
A present-but-non-regular leaf (fifo, symlink, ...) raises FileStoreError instead of hanging or being read.
tests/lib/tools/test_file_store.py:132
Functiontest_filestore_get_returns_none_when_absent
(store: FileStore)
tests/lib/tools/test_file_store.py:152
Functiontest_filestore_hash_file_hashes_one_file_and_shares_the_cache
( store: FileStore, monkeypatch: pytest.MonkeyPatch )
tests/lib/tools/test_file_store.py:241
Functiontest_filestore_hashtree_distrusts_fresh_stamps
Filesystems stamp times with coarse clocks, so a same-tick rewrite can reuse the exact stat identity of the version just hashed. A file whose
tests/lib/tools/test_file_store.py:461
Functiontest_filestore_hashtree_hashes_regular_files_and_skips_symlinks
(tmp_path: Path, store: FileStore)
tests/lib/tools/test_file_store.py:196
Functiontest_filestore_hashtree_refuses_a_symlinked_prefix
A prefix that is a symlink (here to a directory outside the root) is refused, not silently listed as empty.
tests/lib/tools/test_file_store.py:228
Functiontest_filestore_hashtree_rehashes_only_what_changed
A file whose stat identity (mtime, ctime, size) is unchanged since the last walk is served from the cache; a changed file is re-read. The trust
tests/lib/tools/test_file_store.py:419
Functiontest_filestore_is_path_legal
()
tests/lib/tools/test_file_store.py:411
Functiontest_filestore_listings_raise_on_an_unreadable_subdirectory
An unreadable subdirectory fails the listing rather than dropping out of it.
tests/lib/tools/test_file_store.py:209
Functiontest_filestore_ls_lists_recursively_and_never_descends_symlinks
(tmp_path: Path, store: FileStore)
tests/lib/tools/test_file_store.py:159
Functiontest_filestore_move_never_creates_a_missing_root
(store: FileStore)
tests/lib/tools/test_file_store.py:549
Functiontest_filestore_move_renames_within_root_and_refuses_existing_dest
(store: FileStore)
tests/lib/tools/test_file_store.py:269
Functiontest_filestore_open_raises_on_an_unreadable_mount_path
A mount path the process cannot stat raises at open — it is never read as absent, which would mark a real directory ours to remove on dispose.
tests/lib/tools/test_file_store.py:319
Functiontest_filestore_put_executable_sets_owner_exec
(store: FileStore)
tests/lib/tools/test_file_store.py:58
Functiontest_filestore_put_is_atomic_and_leaves_no_temp_on_success
(store: FileStore)
tests/lib/tools/test_file_store.py:64
Functiontest_filestore_put_never_creates_a_missing_root
Only create_root() makes the folder: a put into a store that was never created, or whose folder was removed, raises and re-creates nothing — not
tests/lib/tools/test_file_store.py:516
Functiontest_filestore_put_refuses_a_directory_rel
(store: FileStore, bad: str)
tests/lib/tools/test_file_store.py:376
Functiontest_filestore_put_writes_archive_bytes_verbatim
Archive-shaped bytes land as a single byte-identical file — extraction is never inferred from the content.
tests/lib/tools/test_file_store.py:361
Functiontest_filestore_put_writes_text_and_creates_owner_only_parents
`put` creates nested parents 0o700 and stores text as UTF-8 (file 0o600).
tests/lib/tools/test_file_store.py:47
Functiontest_filestore_remove_deletes_file_and_subtree
(store: FileStore)
tests/lib/tools/test_file_store.py:298
Functiontest_filestore_remove_unlinks_a_dangling_symlink
(store: FileStore)
tests/lib/tools/test_file_store.py:310
Functiontest_filestore_root_path_is_banned_from_the_interface
A rel_path resolving to the root: put/get refuse, move/remove do nothing.
tests/lib/tools/test_file_store.py:281
Functiontest_filestore_utf8_restriction_refuses_binary_content
A store opened with `utf8_only=True` refuses binary content on both verbs that touch it: a put of invalid bytes writes nothing, and a get of a
tests/lib/tools/test_file_store.py:383
Functiontest_finish_runs_once_and_a_second_call_raises
(tmp_path: Path)
tests/lib/tools/memory_sync/test_delete_discipline.py:242
Methodtest_finished_stream_is_freed_without_a_gc_run
( self, beta: bool, client: Anthropic, respx_mock: MockRouter )
tests/lib/streaming/test_messages.py:561
Methodtest_finished_stream_is_freed_without_a_gc_run
( self, beta: bool, async_client: AsyncAnthropic, respx_mock: MockRouter )
tests/lib/streaming/test_messages.py:893
Methodtest_first_call_fetches
(self)
tests/lib/test_credentials.py:1605
Functiontest_first_candidate_that_the_api_can_take_is_applied
()
tests/lib/tools/test_fake_sessions_api.py:349
Functiontest_first_of_two_confirmations_decides_the_call
(first: str, second: str, started: list[str])
tests/lib/tools/test_session_runner.py:750
Methodtest_first_send_creates_a_thread_with_the_seed_and_the_new_messages
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:116
Functiontest_flush_adopts_a_file_the_server_already_holds
A final sync cut off after uploading a file leaves the baseline stale; the flush sees the server already has those bytes and records that inst
tests/lib/tools/memory_sync/test_final_flush.py:172
Functiontest_flush_is_cut_off_and_logs_what_it_did_not_upload
(notes: Path, caplog: pytest.LogCaptureFixture)
tests/lib/tools/memory_sync/test_e2e_memory.py:623
Functiontest_flush_never_pushes_a_read_only_store
(tmp_path: Path)
tests/lib/tools/memory_sync/test_final_flush.py:192
Functiontest_flush_never_raises
(tmp_path: Path, caplog: pytest.LogCaptureFixture)
tests/lib/tools/memory_sync/test_final_flush.py:240
Functiontest_flush_pushes_new_and_changed_files_and_nothing_else
( tmp_path: Path, caplog: pytest.LogCaptureFixture )
tests/lib/tools/memory_sync/test_final_flush.py:37
Functiontest_flush_pushes_nothing_when_the_marker_check_fails
( tmp_path: Path, caplog: pytest.LogCaptureFixture )
tests/lib/tools/memory_sync/test_final_flush.py:221
Functiontest_flush_skips_files_the_server_already_refused
(tmp_path: Path)
tests/lib/tools/memory_sync/test_final_flush.py:205
Functiontest_flush_uploads_several_files_at_once_up_to_the_bound
Two uploads are in flight together, and never more than the bound — a serial flush would time out waiting for the second to start.
tests/lib/tools/memory_sync/test_final_flush.py:92
Methodtest_follow_redirects
(self, respx_mock: MockRouter, client: Anthropic)
tests/test_client.py:1897
← previousnext →7,101–7,200 of 14,068, ranked by callers