MCPcopy Create free account

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

Functions12,274 in github.com/anthropics/anthropic-sdk-python

Methodtest_the_option_read_from_a_client_has_every_field_of_traces
( self, given: Any, traces: dict[str, Any], sync: bool )
tests/test_open_telemetry.py:4565
Methodtest_the_option_read_from_a_client_is_a_copy
( self, sync: bool, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:4521
Functiontest_the_option_read_from_a_client_type_checks_as_an_option_of_a_copy
The type checker checks these lines, which have no cast: what a client reads back spreads into an option.
tests/test_open_telemetry.py:3755
Methodtest_the_original_request_is_not_resent
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:928
Methodtest_the_original_request_is_not_resent
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback.py:1027
Methodtest_the_original_request_is_not_resent
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:1776
Methodtest_the_original_request_is_not_resent
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:2032
Methodtest_the_output_format_is_given_only_when_the_thread_is_created
( self, make_client: Callable[[], Anthropic | AsyncAnthropic], method: str, field: str )
tests/lib/threads/test_beta_threads.py:1921
Functiontest_the_per_pass_cap_spreads_deletes_over_passes
( tmp_path: Path, clock: Clock, caplog: pytest.LogCaptureFixture )
tests/lib/tools/memory_sync/test_delete_discipline.py:112
Functiontest_the_policy_is_called_once_per_navigate_with_the_url_as_written_before_the_driver_runs
()
tests/lib/tools/toolsets/test_enforcement.py:43
Functiontest_the_refusal_names_the_keyboard_members_still_enabled_and_says_how_to_go_on
()
tests/lib/tools/toolsets/test_computer_interface.py:265
Functiontest_the_refusals_are_exported_tool_errors
()
tests/lib/tools/toolsets/test_surface.py:72
Methodtest_the_retry_without_the_partial_does_not_go_back_to_fast
( self, respx_mock: MockRouter, statuses: List[int], hop_requests: List[tuple[str | None, bool]] )
tests/lib/test_refusal_fallback_streaming.py:1701
Methodtest_the_retry_without_the_partial_does_not_go_back_to_fast
( self, respx_mock: MockRouter, statuses: List[int], hop_requests: List[tuple[str | None, bool]] )
tests/lib/test_refusal_fallback_streaming.py:1953
Functiontest_the_runnable_toolset_bases_are_exported_next_to_the_runner
()
tests/lib/tools/toolsets/test_runnable.py:230
Methodtest_the_serving_start_opens_the_wire_with_the_primary_message_id
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:1062
Functiontest_the_shutdown_flush_pushes_a_revert_made_after_a_lost_upload_response
(tmp_path: Path)
tests/lib/tools/memory_sync/test_lost_response.py:174
Functiontest_the_shutdown_flush_pushes_an_edit_made_after_a_lost_upload_response
(tmp_path: Path)
tests/lib/tools/memory_sync/test_lost_response.py:207
Functiontest_the_shutdown_flush_sends_nothing_for_a_revert_whose_upload_never_landed
(tmp_path: Path)
tests/lib/tools/memory_sync/test_lost_response.py:190
Methodtest_the_stream_helper_gets_the_fallback
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:278
Methodtest_the_stream_helper_gets_the_fallback
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:1827
Methodtest_the_suppressed_starts_input_transformations_are_forwarded_on_the_terminal
( self, respx_mock: MockRouter )
tests/lib/test_refusal_fallback_streaming.py:1837
Methodtest_the_suppressed_starts_list_is_forwarded_on_the_terminal
(self, respx_mock: MockRouter)
tests/lib/test_refusal_fallback_streaming.py:1143
Functiontest_the_toolset_path_stays_encodable_and_cuts_to_the_field_limit
()
tests/lib/tools/toolsets/test_runnable.py:156
Methodtest_the_turn_after_a_refused_one_drops_the_cache_markers_of_the_recorded_messages
( self, respx_mock: MockRouter )
tests/lib/threads/test_beta_threads.py:1018
Functiontest_the_url_policy_runs_before_confirm
()
tests/lib/tools/toolsets/test_confirm.py:233
Methodtest_the_variable_sets_propagation_for_a_client_that_is_given_no_option
( self, variable: str, option: OpenTelemetryClientOption, propagates: bool,
tests/test_open_telemetry.py:4252
Methodtest_the_variables_are_read_under_their_traces_names_only
(self, sync: bool)
tests/test_open_telemetry.py:4060
Methodtest_the_variables_do_not_reach_a_client_that_is_given_false
(self, sync: bool)
tests/test_open_telemetry.py:3922
Methodtest_the_variables_do_not_reach_a_client_that_is_given_the_option
( self, option: dict[str, Any], sync: bool, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:3899
Methodtest_the_variables_do_not_reach_a_platform_client_that_is_given_the_option
(self, spans: Spans)
tests/test_open_telemetry.py:3935
Methodtest_thinking_is_a_reasoning_part_without_its_signature
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:5507
Methodtest_third_party_provider_names
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:2807
Methodtest_third_party_streams_and_token_counts_have_the_request_model
( self, spans: Spans, respx_mock: MockRouter )
tests/test_open_telemetry.py:2848
Methodtest_thread_params_types_hold_the_fields_of_create
(self)
tests/lib/threads/test_beta_threads.py:1990
Methodtest_thread_raises_on_clients_without_message_threads
(self, make_client: Callable[[], Any])
tests/lib/threads/test_tool_runner_threading.py:851
Methodtest_thread_rejects_both_output_format_and_output_config_format
(self)
tests/lib/threads/test_beta_threads.py:1482
Methodtest_thread_requires_the_fields_create_requires
( self, make_client: Callable[[], Anthropic | AsyncAnthropic], field: str )
tests/lib/threads/test_beta_threads.py:1931
Functiontest_thread_status_event_types_all_tell_the_primary_thread
(events: Any)
tests/lib/tools/test_open_telemetry.py:2583
Functiontest_thread_termination_after_end_turn_idle_does_not_cancel_idle_stop
A client can archive a child thread once the session is idle. Another idle need not follow the thread's terminated event, so the event must leave
tests/lib/tools/test_session_runner.py:1402
Functiontest_thread_termination_after_failed_history_read_does_not_start_idle_countdown
An ask-gated call defers the countdown of an idle, the stream drops, and the history read fails. The session may have run since that idle, so drop
tests/lib/tools/test_session_runner.py:1569
Functiontest_thread_termination_does_not_start_idle_countdown
The event neither starts the countdown after an idle that leaves the turn open, nor keeps it going once the session runs again.
tests/lib/tools/test_session_runner.py:1428
Methodtest_thread_without_messages_starts_empty
(self, respx_mock: MockRouter)
tests/lib/threads/test_beta_threads.py:1967
Functiontest_throws_on_an_index_gap
()
tests/lib/sessions/test_accumulate.py:96
Functiontest_throws_on_event_delta_with_no_prior_snapshot
()
tests/lib/sessions/test_accumulate.py:102
Methodtest_time_to_first_chunk_counts_from_the_first_attempt
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:1077
Methodtest_time_to_first_chunk_is_set_at_the_first_content_block_delta
( self, content_block: dict[str, Any], delta: dict[str, Any], spans: Spans, respx_mock: MockRouter
tests/test_open_telemetry.py:1807
Methodtest_timeout
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:1042
Functiontest_to_dict
()
tests/test_models.py:522
Methodtest_to_dict_method
(self)
tests/lib/tools/test_functions.py:171
Functiontest_to_json
()
tests/test_models.py:590
Functiontest_to_session_content_document_passthrough
()
tests/lib/tools/test_session_runner.py:2227
Functiontest_to_session_content_image_passthrough
()
tests/lib/tools/test_session_runner.py:2218
Functiontest_to_session_content_search_result_passthrough
A `search_result` block — valid on the Sessions content union — passes through structurally so the model retains the typed citation metadata.
tests/lib/tools/test_session_runner.py:2237
Functiontest_to_session_content_text_passthrough
()
tests/lib/tools/test_session_runner.py:2213
Functiontest_to_session_content_tool_reference_stringified
`tool_reference` blocks have no Sessions equivalent and must be stringified.
tests/lib/tools/test_session_runner.py:2251
Methodtest_token_endpoint_called_once_across_requests
(self, respx_mock: MockRouter)
tests/lib/test_credentials.py:2532
Functiontest_token_provider_attaches_bearer
(respx_mock: MockRouter)
tests/lib/test_google_cloud.py:409
Functiontest_token_provider_attaches_bearer_async
(respx_mock: MockRouter)
tests/lib/test_google_cloud.py:430
Functiontest_token_provider_without_project_raises_on_first_request
()
tests/lib/test_google_cloud.py:853
Methodtest_token_type_mismatch_does_not_retain_minted_token
(self)
tests/lib/test_credentials.py:4906
Functiontest_too_many_positional_params
()
tests/test_required_args.py:8
Functiontest_tool_addition_by_value_re_enables_removed_tool_sync
(respx_mock: MockRouter)
tests/lib/tools/test_runners.py:1159
Functiontest_tool_addition_re_enables_removed_tool_sync
(respx_mock: MockRouter)
tests/lib/tools/test_runners.py:1112
Functiontest_tool_addition_via_append_messages_re_enables_removed_tool_sync
(respx_mock: MockRouter)
tests/lib/tools/test_runners.py:1438
Methodtest_tool_arguments_alone_over_the_bound_are_removed_whole
( self, city: str, size: int, spans: Spans, respx_mock: MockRouter )
tests/lib/tools/test_open_telemetry.py:670
Methodtest_tool_arguments_exactly_at_the_bound_stay_and_one_over_are_removed_whole
(self)
tests/lib/tools/test_open_telemetry.py:645
Methodtest_tool_call_caching
(self, snapshot_client: Anthropic)
tests/lib/tools/test_runners.py:285
Methodtest_tool_call_error
( self, snapshot_client: Anthropic, caplog: pytest.LogCaptureFixture, )
tests/lib/tools/test_runners.py:214
Methodtest_tool_call_that_the_application_holds_has_one_span_when_it_runs
( self, spans: Spans, respx_mock: MockRouter )
tests/lib/tools/test_open_telemetry.py:1575
Methodtest_tool_call_that_the_application_holds_on_an_async_runner_has_one_span_when_it_runs
( self, spans: Spans, respx_mock: MockRouter )
tests/lib/tools/test_open_telemetry.py:1605
Functiontest_tool_changes_go_out_with_the_compaction_request_and_follow_its_response
( sync: bool, client: Anthropic, async_client: AsyncAnthropic, respx_mock: MockRouter )
tests/lib/tools/test_runners.py:2086
Functiontest_tool_changes_in_one_turn_are_sent_together_in_call_order
( sync: bool, order: str, client: Anthropic, async_client: AsyncAnthropic, respx_mock: MockRouter )
tests/lib/tools/test_runners.py:1849
Functiontest_tool_changes_made_before_the_first_request_follow_a_trailing_assistant_message
( sync: bool, client: Anthropic, async_client: AsyncAnthropic, respx_mock: MockRouter )
tests/lib/tools/test_runners.py:1719
Functiontest_tool_changes_made_during_a_paused_turn_are_sent_one_request_later
( sync: bool, client: Anthropic, async_client: AsyncAnthropic, respx_mock: MockRouter )
tests/lib/tools/test_runners.py:2049
Functiontest_tool_changes_pending_when_the_run_ends_are_not_sent
( sync: bool, ended_by: str, client: Anthropic, async_client: AsyncAnthropic, respx_mock: MockRouter )
tests/lib/tools/test_runners.py:2168
Functiontest_tool_changes_when_streaming
( sync: bool, client: Anthropic, async_client: AsyncAnthropic, respx_mock: MockRouter )
tests/lib/tools/test_runners.py:2201
Functiontest_tool_configs_go_onto_the_entry_and_the_helper_tag_does_not
()
tests/lib/tools/toolsets/test_interface.py:199
Functiontest_tool_configs_go_onto_the_entry_and_the_helper_tag_does_not
()
tests/lib/tools/toolsets/test_computer_interface.py:127
Methodtest_tool_content_that_json_cannot_hold_is_not_recorded
(self, spans: Spans, respx_mock: MockRouter)
tests/lib/tools/test_open_telemetry.py:730
Methodtest_tool_description
(self, spans: Spans, respx_mock: MockRouter)
tests/lib/tools/test_open_telemetry.py:850
Methodtest_tool_description
(self, spans: Spans, monkeypatch: pytest.MonkeyPatch)
tests/lib/tools/test_open_telemetry.py:2541
Methodtest_tool_error
(self, spans: Spans, respx_mock: MockRouter)
tests/lib/tools/test_open_telemetry.py:351
Functiontest_tool_error_content_with_a_lone_surrogate_does_not_break_the_next_request
( sync: bool, client: Anthropic, async_client: AsyncAnthropic, respx_mock: MockRouter, cap
tests/lib/tools/test_runners.py:2313
Functiontest_tool_error_preserves_structured_content
`ToolError` raised by the tool preserves its structured content rather than being stringified through `repr(e)`.
tests/lib/tools/test_session_runner.py:1970
Functiontest_tool_error_text_with_a_lone_surrogate_does_not_break_the_next_request
( sync: bool, client: Anthropic, async_client: AsyncAnthropic, respx_mock: MockRouter, cap
tests/lib/tools/test_runners.py:2270
Functiontest_tool_removal_applies_when_the_history_has_a_system_message_without_content
( sync: bool, client: Anthropic, async_client: AsyncAnthropic, respx_mock: MockRouter )
tests/lib/tools/test_runners.py:1746
Functiontest_tool_removal_in_compaction_tool_changes_routes_call_down_unknown_tool_path_sync
( respx_mock: MockRouter, )
tests/lib/tools/test_runners.py:1557
Functiontest_tool_removal_in_echoed_compaction_turn_routes_call_down_unknown_tool_path_sync
( respx_mock: MockRouter, )
tests/lib/tools/test_runners.py:1495
Functiontest_tool_removal_of_member_name_does_not_withdraw_toolset
( client: Anthropic, async_client: AsyncAnthropic, respx_mock: MockRouter, navigate: BetaFunct
tests/lib/tools/toolsets/test_runner.py:464
Functiontest_tool_removal_routes_call_down_unknown_tool_path_async
(respx_mock: MockRouter)
tests/lib/tools/test_runners.py:1214
Functiontest_tool_removal_routes_call_down_unknown_tool_path_sync
(respx_mock: MockRouter)
tests/lib/tools/test_runners.py:1044
Functiontest_tool_removal_via_append_messages_between_turns_sync
(respx_mock: MockRouter)
tests/lib/tools/test_runners.py:1282
Functiontest_tool_removal_via_append_messages_same_turn_sync
(respx_mock: MockRouter)
tests/lib/tools/test_runners.py:1337
Functiontest_tool_removal_via_set_messages_params_sync
(respx_mock: MockRouter)
tests/lib/tools/test_runners.py:1382
Functiontest_tool_result_block_types_all_keep_their_fields_or_only_their_type
(tool_result: Any)
tests/test_open_telemetry.py:8440
Functiontest_tool_result_builds_the_block_and_never_raises_a_tool_error
()
tests/lib/tools/toolsets/test_computer_pipeline.py:300
Methodtest_tool_result_content
(self, spans: Spans, respx_mock: MockRouter)
tests/lib/tools/test_open_telemetry.py:373
Methodtest_tool_result_content_is_content_blocks
(self, spans: Spans, respx_mock: MockRouter)
tests/test_open_telemetry.py:4966
Methodtest_tool_result_content_is_within_the_clients_max_content_bytes
( self, spans: Spans, respx_mock: MockRouter )
tests/lib/tools/test_open_telemetry.py:557
← previousnext →11,001–11,100 of 12,274, ranked by callers