MCPcopy Create free account

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

Functions9,455 in github.com/anthropics/anthropic-sdk-python

Functiontest_field_named_cls
()
tests/test_models.py:933
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_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:929
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:182
Methodtest_file_upload_with_request_copying_middleware
(self, respx_mock: MockRouter, tmp_path: Path)
tests/test_middleware.py:1211
Methodtest_file_value_is_same_reference
(self)
tests/test_files.py:121
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_first_call_fetches
(self)
tests/lib/test_credentials.py:1540
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_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:1381
Methodtest_follow_redirects
(self, respx_mock: MockRouter, async_client: AsyncAnthropic)
tests/test_client.py:2716
Methodtest_follow_redirects_disabled
(self, respx_mock: MockRouter, client: Anthropic)
tests/test_client.py:1393
Methodtest_follow_redirects_disabled
(self, respx_mock: MockRouter, async_client: AsyncAnthropic)
tests/test_client.py:2728
Methodtest_for_base_url
The first bind (and re-binds to the same host) happen in place; a bind to another host yields a separate provider and leaves the origi
tests/lib/test_credentials.py:1190
Methodtest_for_base_url_federation_profile
A second host gets its own provider exchanging there; the original keeps exchanging at the first host, and only the original uses the
tests/lib/test_credentials.py:449
Methodtest_for_base_url_http_rejected
(self)
tests/lib/test_credentials.py:1210
Methodtest_for_base_url_returns_self_when_bind_is_moot
No per-host provider is made when the bind can't change where the tokens come from: the profile pins its own `base_url`, or it is a us
tests/lib/test_credentials.py:482
Functiontest_forwards_compat_model_dump_json_method
()
tests/test_models.py:603
Functiontest_forwards_compat_model_dump_method
()
tests/test_models.py:539
Methodtest_foundry_clients_accept_middleware
(self)
tests/test_middleware.py:2110
Methodtest_fresh_token_not_refetched
(self)
tests/lib/test_credentials.py:1589
Methodtest_full_fixture_tool_wire
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:1436
Methodtest_full_surface_present
(self)
tests/lib/test_google_cloud.py:193
Methodtest_function_call_with_invalid_input
( self, input_data: dict[str, Any], expected_error_type: type[BaseException], expected_error_msg: str
tests/lib/tools/test_functions.py:111
Methodtest_function_call_with_valid_input
(self)
tests/lib/tools/test_functions.py:78
Methodtest_function_with_multiple_types
Test function schema conversion with various Python types.
tests/lib/tools/test_functions.py:43
Methodtest_function_without_docstring
(self)
tests/lib/tools/test_functions.py:190
Methodtest_function_without_type_hints
(self)
tests/lib/tools/test_functions.py:198
Methodtest_functional_middleware
(self, respx_mock: MockRouter)
tests/test_middleware.py:775
Methodtest_functional_middleware
(self, respx_mock: MockRouter)
tests/test_middleware.py:1511
Methodtest_generator_body_survives_retries
( self, respx_mock: MockRouter, client: Anthropic | AsyncAnthropic, monkeypatch: pytest.MonkeyPatch
tests/test_prepare.py:815
Functiontest_get_does_not_prepare_a_body
(send: Send, monkeypatch: pytest.MonkeyPatch)
tests/test_prepare.py:568
Methodtest_get_platform
(self)
tests/test_client.py:2665
Methodtest_get_token_rejects_async_provider
(self)
tests/lib/test_credentials.py:1572
Functiontest_gives_the_timing_from_before_when_the_caller_defers_every_call
(setup: SetupFactory)
tests/lib/tools/test_runner_eager_tools.py:417
Functiontest_glob_and_grep_reach_an_allowed_root
(tmp_path: Path, monkeypatch: pytest.MonkeyPatch)
tests/lib/tools/test_agent_toolset.py:970
Functiontest_glob_drops_matches_that_cannot_be_canonicalised
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:904
Functiontest_glob_mtime_order
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:653
Functiontest_glob_post_filters_symlink_escape
A symlink traversed mid-pattern must not let a glob result escape the workdir.
tests/lib/tools/test_agent_toolset.py:889
Functiontest_glob_rejects_dotdot_pattern
`Path.glob` honours literal `..` segments — the tool must reject a pattern that would walk out of the workdir before it ever runs.
tests/lib/tools/test_agent_toolset.py:875
Functiontest_glob_with_path
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:668
Methodtest_global_region_base_url
Test that global region uses the correct base URL.
tests/lib/test_vertex.py:186
Methodtest_global_region_base_url
Test that global region uses the correct base URL.
tests/lib/test_vertex.py:380
Methodtest_google_credentials_exposed_without_shadowing_base_attribute
(self)
tests/lib/test_google_cloud.py:183
Functiontest_grep_finds_match
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:680
Functiontest_grep_single_file_path
Fallback walker must handle a file path, not just directories.
tests/lib/tools/test_agent_toolset.py:689
Functiontest_grep_skips_symlinked_files
The fallback walker must not read through a symlink that escapes the workdir.
tests/lib/tools/test_agent_toolset.py:914
Methodtest_handle_async_is_passthrough
(self)
tests/test_middleware.py:509
Methodtest_handle_is_passthrough
(self)
tests/test_middleware.py:497
Functiontest_handle_item_falls_back_to_env_vars
(monkeypatch: pytest.MonkeyPatch)
tests/lib/environments/test_worker.py:657
Functiontest_handle_item_falls_back_to_work_secret_env_var
`work_secret` falls back to `ANTHROPIC_WORK_SECRET` (the env var the `worker poll --on-work` command sets alongside the others); when neither
tests/lib/environments/test_worker.py:743
Functiontest_handle_item_keyless_with_a_tokenless_secret_raises
A work secret that yields no sessions token, with no environment key to fall back to, must not run the item unauthenticated: the error names both
tests/lib/environments/test_worker.py:828
Functiontest_handle_item_missing_required_raises
(monkeypatch: pytest.MonkeyPatch)
tests/lib/environments/test_worker.py:771
Functiontest_handle_item_runs_keyless_on_a_token_bearing_secret
With no environment key anywhere — argument, constructor, or env var — a work secret whose payload carries a sessions token is credential enough:
tests/lib/environments/test_worker.py:800
Functiontest_handle_item_services_a_single_claimed_item
(monkeypatch: pytest.MonkeyPatch)
tests/lib/environments/test_worker.py:615
Functiontest_handle_item_uses_constructor_environment_key
`environment_key` resolves to the worker's own key when not passed and no env var is set.
tests/lib/environments/test_worker.py:688
Functiontest_handle_item_uses_work_secret_argument
An explicit `work_secret` payload supplies the per-item Bearer credential (its sessions token); an `environment_key` passed alongside it is on
tests/lib/environments/test_worker.py:713
Methodtest_handles_null_body
(self)
tests/lib/test_aws_auth.py:526
Methodtest_hardcoded_query_params_in_url
(self, client: Anthropic)
tests/test_client.py:562
Methodtest_hardcoded_query_params_in_url
(self, async_client: AsyncAnthropic)
tests/test_client.py:1861
← previousnext →4,801–4,900 of 9,455, ranked by callers