MCPcopy Create free account

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

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

Methodtest_fork_of_a_thread_that_ends_in_a_partial_reply_sends_the_turn_again_without_it
( self, respx_mock: MockRouter, forks: int, method: str )
tests/lib/threads/test_async_beta_threads.py:205
Methodtest_fork_of_a_thread_that_ends_in_a_whole_reply_sends_the_full_history_with_no_new_message
( self, respx_mock: MockRouter )
tests/lib/threads/test_beta_threads.py:1423
Methodtest_fork_of_a_thread_that_ends_in_a_whole_reply_sends_the_full_history_with_no_new_message
( self, respx_mock: MockRouter )
tests/lib/threads/test_async_beta_threads.py:248
Methodtest_fork_returns_a_thread_with_no_previous_message_id_without_a_request
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:1321
Functiontest_forwards_compat_model_dump_json_method
()
tests/test_models.py:637
Functiontest_forwards_compat_model_dump_method
()
tests/test_models.py:573
Methodtest_foundry_clients_accept_middleware
(self)
tests/test_middleware.py:2107
Methodtest_foundry_runner_threads_by_default
(self, respx_mock: MockRouter)
tests/lib/threads/test_tool_runner_threading.py:860
Methodtest_fresh_token_not_refetched
(self)
tests/lib/test_credentials.py:1654
Methodtest_full_fixture_tool_wire
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:1470
Methodtest_full_surface_present
(self)
tests/lib/test_google_cloud.py:382
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:776
Methodtest_functional_middleware
(self, respx_mock: MockRouter)
tests/test_middleware.py:1510
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:3009
Methodtest_get_token_rejects_async_provider
(self)
tests/lib/test_credentials.py:1637
Functiontest_given_tracer_provider_is_asked_at_the_first_call
Whatever the registered provider does.
tests/test_tracing.py:371
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:1962
Functiontest_glob_drops_matches_that_cannot_be_canonicalised
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:1847
Functiontest_glob_mtime_order
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:668
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:1832
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:1818
Functiontest_glob_with_path
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:683
Methodtest_global_region_base_url
Test that global region uses the correct base URL.
tests/lib/test_vertex.py:353
Methodtest_global_region_base_url
Test that global region uses the correct base URL.
tests/lib/test_vertex.py:874
Methodtest_global_tracer_provider_that_cannot_be_loaded_leaves_platform_clients_without_spans
( self, spans: Spans, respx_mock: MockRouter, caplog: pytest.LogCaptureFixture )
tests/test_open_telemetry.py:8126
Methodtest_global_tracer_provider_that_cannot_be_loaded_leaves_the_client_without_spans
( self, sync: bool, spans: Spans, respx_mock: MockRouter, caplog: pytest.LogCaptureFixture )
tests/test_open_telemetry.py:8102
Methodtest_google_credentials_exposed_without_shadowing_base_attribute
(self)
tests/lib/test_google_cloud.py:372
Functiontest_grep_does_not_pass_anthropic_variables_to_rg
(tmp_path: Path, monkeypatch: pytest.MonkeyPatch)
tests/lib/tools/test_agent_toolset.py:785
Functiontest_grep_finds_match
(tmp_path: Path)
tests/lib/tools/test_agent_toolset.py:799
Functiontest_grep_ignores_relative_path_entries
( tmp_path: Path, monkeypatch: pytest.MonkeyPatch, relative_entry: str )
tests/lib/tools/test_agent_toolset.py:697
Functiontest_grep_ignores_the_ripgrep_config_file
(tmp_path: Path, monkeypatch: pytest.MonkeyPatch)
tests/lib/tools/test_agent_toolset.py:1890
Functiontest_grep_passes_no_config_to_rg
(tmp_path: Path, monkeypatch: pytest.MonkeyPatch)
tests/lib/tools/test_agent_toolset.py:1905
Functiontest_grep_passes_over_an_rg_inside_the_workdir_or_an_allowed_root
( tmp_path: Path, monkeypatch: pytest.MonkeyPatch, entry: str )
tests/lib/tools/test_agent_toolset.py:741
Functiontest_grep_runs_no_rg_when_an_allowed_root_cannot_be_resolved
( tmp_path: Path, monkeypatch: pytest.MonkeyPatch )
tests/lib/tools/test_agent_toolset.py:767
Functiontest_grep_runs_the_rg_named_for_the_platform
( tmp_path: Path, monkeypatch: pytest.MonkeyPatch, os_name: str, expected: str )
tests/lib/tools/test_agent_toolset.py:721
Functiontest_grep_single_file_path
Fallback walker must handle a file path, not just directories.
tests/lib/tools/test_agent_toolset.py:808
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:1857
Functiontest_grep_walk_leaves_the_hosts_signal_alone
(tmp_path: Path, monkeypatch: pytest.MonkeyPatch)
tests/lib/tools/test_agent_toolset.py:836
Functiontest_grep_walk_stops_a_backtracking_pattern
(tmp_path: Path, monkeypatch: pytest.MonkeyPatch)
tests/lib/tools/test_agent_toolset.py:821
Functiontest_grep_walk_works_off_the_main_thread
(tmp_path: Path, monkeypatch: pytest.MonkeyPatch)
tests/lib/tools/test_agent_toolset.py:873
Functiontest_grep_walk_works_without_interval_timers
( tmp_path: Path, monkeypatch: pytest.MonkeyPatch, error: type[Exception] )
tests/lib/tools/test_agent_toolset.py:859
Functiontest_grep_without_rg_reads_only_regular_files
(tmp_path: Path, monkeypatch: pytest.MonkeyPatch)
tests/lib/tools/test_agent_toolset.py:1873
Methodtest_handle_async_is_passthrough
(self)
tests/test_middleware.py:510
Methodtest_handle_is_passthrough
(self)
tests/test_middleware.py:498
Functiontest_handle_item_has_no_span_of_its_own
()
tests/lib/environments/test_worker.py:1026
Functiontest_handle_item_logs_a_failure_when_its_credential_has_ended
( refused: str, cleanup_seconds: float, caplog: pytest.LogCaptureFixture )
tests/lib/environments/test_worker.py:928
Functiontest_handle_item_picks_its_credential
( arguments: dict[str, str], workers_key: str | None, variables: dict[str, str], credential: s
tests/lib/environments/test_worker.py:860
Functiontest_handle_item_raises_a_failure_whose_stop_outlasts_the_lease
()
tests/lib/environments/test_worker.py:480
Functiontest_handle_item_raises_the_refusal_of_the_first_heartbeat_only
(at: float, status: int)
tests/lib/environments/test_worker.py:472
Functiontest_handle_item_raises_without_a_request_when_something_is_missing_or_empty
( arguments: dict[str, str | None], message: str, monkeypatch: pytest.MonkeyPatch )
tests/lib/environments/test_worker.py:886
Functiontest_handle_item_returns_when_the_lease_ends
(steps: list[Step])
tests/lib/environments/test_worker.py:918
Functiontest_handle_item_serves_one_item_without_polling
()
tests/lib/environments/test_worker.py:822
Functiontest_handle_item_stops_the_item_and_raises_its_failure
( steps: list[Step], options: dict[str, Any], error: type[Exception], message: str )
tests/lib/environments/test_worker.py:907
Functiontest_handle_item_takes_the_ids_from_its_arguments_or_else_the_environment
( arguments: dict[str, str], variables: dict[str, str], monkeypatch: pytest.MonkeyPatch )
tests/lib/environments/test_worker.py:833
Functiontest_handled_call_is_not_handled_again_after_a_reconnect
(call: Call)
tests/lib/tools/test_session_runner.py:1575
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:708
Methodtest_hardcoded_query_params_in_url
(self, async_client: AsyncAnthropic)
tests/test_client.py:2161
Functiontest_has_all_resources
()
tests/lib/test_aws.py:400
Methodtest_headers_default_to_empty_mapping
(self)
tests/test_middleware.py:403
Functiontest_headers_set_during_iteration_are_sent_with_later_requests
()
tests/lib/tools/test_session_runner.py:2146
Functiontest_heartbeat_in_flight_delays_the_stop_by_at_most_5_seconds
( sent_at: float, cancelled_after: float, stopped_after: float )
tests/lib/environments/test_worker.py:508
Functiontest_heartbeat_that_gets_no_response_times_out_after_30_seconds
(fault: Fault)
tests/lib/environments/test_worker.py:263
Functiontest_heartbeats_are_sent_every_half_ttl_or_30_seconds_counted_from_when_one_is_sent
( ttl: int, times: list[float] )
tests/lib/environments/test_worker.py:235
Functiontest_heartbeats_continue_while_a_sync_tool_blocks
(backend: str)
tests/lib/environments/test_worker.py:301
Functiontest_heartbeats_continue_while_skills_download
()
tests/lib/environments/test_worker.py:713
Methodtest_held_response_stays_open
(self, client: Anthropic, held: Held[Any, Any])
tests/test_streaming.py:231
Methodtest_held_response_stays_open
(self, async_client: AsyncAnthropic, held: AsyncHeld[Any, Any])
tests/test_streaming.py:279
Functiontest_helper_header
()
tests/lib/test_stainless_helpers.py:32
Functiontest_helper_header_is_an_append_header
()
tests/lib/test_stainless_helpers.py:36
Functiontest_history_is_asked_for_in_pages_of_1000_events
()
tests/lib/tools/test_session_runner.py:1361
Functiontest_history_is_paged_and_can_end_with_the_pending_input
( page: str, lists_pending: bool, listed: list[str], next_page: str | None, session: FakeS
tests/lib/tools/test_fake_sessions_api.py:214
Functiontest_holds_a_call_that_is_deferred
(setup: SetupFactory, at: str)
tests/lib/tools/test_runner_eager_tools.py:405
Functiontest_holds_a_call_that_the_caller_defers_until_the_loop_body_ends
(setup: SetupFactory)
tests/lib/tools/test_runner_eager_tools.py:82
Methodtest_http_4xx_does_not_retain_assertion
(self)
tests/lib/test_credentials.py:5214
Methodtest_http_base_url_in_config_file_raises_anthropic_error
( self, clean_env: pytest.MonkeyPatch, tmp_path: pathlib.Path )
tests/lib/test_credentials.py:4374
Methodtest_http_base_url_on_workload_provider_raises_anthropic_error
(self)
tests/lib/test_credentials.py:4365
Methodtest_http_base_url_rejected
(self)
tests/lib/test_credentials.py:3509
Methodtest_http_client_timeout_option
(self)
tests/test_client.py:401
Methodtest_http_client_timeout_option
(self)
tests/test_client.py:1848
Methodtest_httpx_objects_rejected
(self, client: Anthropic)
tests/test_client.py:537
Methodtest_httpx_objects_rejected
(self, async_client: AsyncAnthropic)
tests/test_client.py:1986
Functiontest_idempotent_and_does_not_mutate_input
( send: Send, make_body: Callable[[], object], sent: object, monkeypatch: pytest.MonkeyPatch )
tests/test_prepare.py:714
Methodtest_identity_token_file_binary_content_raises_anthropic_error
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:4413
Methodtest_identity_token_file_directory_raises_anthropic_error
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:4406
Methodtest_identity_token_file_empty_raises_anthropic_error
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:4421
Methodtest_identity_token_file_permission_error_raises_anthropic_error
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:4390
Methodtest_identity_token_provider_override
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:3328
Functiontest_idle_flush_is_skipped_while_a_call_is_running
(notes: Path, reconnect: bool)
tests/lib/tools/memory_sync/test_e2e_memory.py:108
Functiontest_idle_poller_logs_once_and_then_every_5_minutes
(sync: bool, caplog: pytest.LogCaptureFixture)
tests/lib/environments/test_poller.py:121
Functiontest_idle_stop_waits_for_a_connection_that_succeeds
(outage: list[Step], ended: float)
tests/lib/tools/test_session_runner.py:1855
Methodtest_ids_in_the_path
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:7317
← previousnext →7,101–7,200 of 13,873, ranked by callers