MCPcopy Create free account

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

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

Methodtest_copy_x_stainless_helper_header_appends
x-stainless-helper accumulates across copies instead of being clobbered.
tests/lib/test_azure.py:173
Methodtest_copy_x_stainless_helper_header_appends
(self)
tests/lib/test_bedrock_mantle.py:300
Methodtest_corrupt_expires_at_does_not_retain_tokens
`_coerce_expires_at` raises in a secret-free frame, but the error propagates through `_call_user_oauth` whose locals hold the creds di
tests/lib/test_credentials.py:4695
Methodtest_corrupt_expires_at_external_profile_does_not_retain_token
Same as above via the no-client_id (externally rotated) path.
tests/lib/test_credentials.py:4719
Functiontest_count_tokens_accepts_a_type
(client: Anthropic, respx_mock: MockRouter)
tests/lib/test_output_format_helpers.py:28
Functiontest_count_tokens_merges_the_type_into_an_existing_output_config
(client: Anthropic, respx_mock: MockRouter)
tests/lib/test_output_format_helpers.py:45
Functiontest_count_tokens_output_config_dict_still_works
(client: Anthropic, respx_mock: MockRouter)
tests/lib/test_output_format_helpers.py:79
Functiontest_count_tokens_rejects_a_schema_dict
(client: Anthropic)
tests/lib/test_output_format_helpers.py:60
Methodtest_count_tokens_takes_a_tool_object
(self, client: Anthropic, respx_mock: respx.MockRouter)
tests/lib/test_stainless_helpers.py:114
Methodtest_count_tokens_takes_a_tool_object
( self, async_client: AsyncAnthropic, respx_mock: respx.MockRouter )
tests/lib/test_stainless_helpers.py:213
Methodtest_create
(self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:76
Methodtest_create
(self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:597
Methodtest_create_error_if_file_already_exists
( self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:100
Methodtest_create_error_if_file_already_exists
( self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:623
Methodtest_create_nested_directories
(self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:88
Methodtest_create_nested_directories
( self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:609
Methodtest_credentials_file_absent_type_is_lenient
Hand-written credentials files without `type` are accepted.
tests/lib/test_credentials.py:305
Methodtest_credentials_file_group_or_other_access_rejected
(self, tmp_path: pathlib.Path, mode: int)
tests/lib/test_credentials.py:839
Methodtest_credentials_file_owner_only_accepted
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:847
Methodtest_credentials_file_symlink_rejected
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:859
Methodtest_credentials_file_wrong_type_raises
(self, tmp_path: pathlib.Path)
tests/lib/test_credentials.py:292
Functiontest_credentials_object_attaches_bearer
(respx_mock: MockRouter)
tests/lib/test_google_cloud.py:308
Methodtest_credentials_only_still_works
(self, caplog: pytest.LogCaptureFixture)
tests/lib/test_credentials.py:4281
Methodtest_credentials_path_override
Config's `credentials_path` field redirects to a custom location.
tests/lib/test_credentials.py:987
Methodtest_credentials_type_mismatch_does_not_retain_tokens
( self, clean_env: pytest.MonkeyPatch, tmp_path: pathlib.Path )
tests/lib/test_credentials.py:4677
Functiontest_cursor_position_renders_as_a_text_line
()
tests/lib/tools/toolsets/test_computer_pipeline.py:78
Methodtest_custom_env_var
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:145
Methodtest_custom_env_var
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:245
Methodtest_custom_env_var
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:331
Methodtest_custom_env_var
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:413
Methodtest_custom_env_var_not_set_defaults_to_sigv4
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:159
Functiontest_custom_headers_env_authorization_never_conflicts
( respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch )
tests/lib/test_google_cloud.py:510
Functiontest_custom_headers_env_flows_through
(respx_mock: MockRouter, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_google_cloud.py:491
Methodtest_custom_headers_env_var_is_overridden_case_insensitively
(self, client_cls: ClientClass)
tests/test_header_case_sensitivity.py:118
Methodtest_custom_input_schema_with_dict
(self)
tests/lib/tools/test_functions.py:132
Methodtest_custom_input_schema_with_pydantic_model
(self)
tests/lib/tools/test_functions.py:147
Methodtest_custom_message_handling
(self, snapshot_client: Anthropic)
tests/lib/tools/test_runners.py:278
Methodtest_custom_name_and_description
(self)
tests/lib/tools/test_functions.py:122
Methodtest_custom_url_template
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:402
Functiontest_data_json_escaped_double_new_line
(sync: bool, client: Anthropic, async_client: AsyncAnthropic)
tests/test_streaming.py:134
Functiontest_data_missing_event
(sync: bool, client: Anthropic, async_client: AsyncAnthropic)
tests/test_streaming.py:34
Functiontest_date_parsing
(value: Union[str, bytes, int, float], result: Union[date, Type[Exception]])
tests/test_utils/test_datetime_parse.py:53
Methodtest_date_serialization
(self)
tests/test_utils/test_json.py:34
Functiontest_dates_are_prepared_as_iso_strings
( send: Send, client: Anthropic | AsyncAnthropic, value: date, iso: str )
tests/test_prepare.py:374
Functiontest_datetime
()
tests/test_qs.py:27
Functiontest_datetime_parsing
(value: Union[str, bytes, int, float], result: Union[datetime, Type[Exception]])
tests/test_utils/test_datetime_parse.py:105
Methodtest_datetime_serialization
(self)
tests/test_utils/test_json.py:28
Methodtest_decorator_with_custom_parameters
Test using @function_tool() decorator with custom name and description.
tests/lib/tools/test_functions.py:406
Methodtest_decorator_with_parentheses
Test using @function_tool() decorator with parentheses.
tests/lib/tools/test_functions.py:394
Methodtest_decorator_without_parentheses
Test using @function_tool decorator without parentheses.
tests/lib/tools/test_functions.py:371
Functiontest_deep_nesting
(send: Send, client: Anthropic | AsyncAnthropic, monkeypatch: pytest.MonkeyPatch)
tests/test_prepare.py:726
Methodtest_default_client_creation
(self)
tests/test_client.py:1369
Methodtest_default_client_creation
(self)
tests/test_client.py:2704
Methodtest_default_credentials_explicit_env_propagates_error
When ANTHROPIC_PROFILE or ANTHROPIC_CONFIG_DIR is set explicitly, a broken config file surfaces immediately — not swallowed into a 'no auth
tests/lib/test_credentials.py:773
Methodtest_default_dir_with_configs_triggers_tier1
No env vars but configs/ has files → tier 1 fires via _has_any_config().
tests/lib/test_credentials.py:2119
Functiontest_default_disabled_members_match_the_published_toolset
()
tests/lib/tools/toolsets/test_registry.py:42
Methodtest_default_headers_case_insensitive
(self)
tests/test_client.py:477
Methodtest_default_headers_case_insensitive
(self)
tests/test_client.py:1774
Methodtest_default_headers_omit_removes_client_subclass_header_case_insensitively
( self, client_cls: ClientClass )
tests/test_header_case_sensitivity.py:147
Methodtest_default_headers_omit_removes_per_request_sdk_header
(self, client_cls: ClientClass)
tests/test_header_case_sensitivity.py:167
Methodtest_default_headers_option
(self)
tests/test_client.py:425
Methodtest_default_headers_option
(self)
tests/test_client.py:1722
Methodtest_default_headers_replace_client_subclass_header_case_insensitively
(self, client_cls: ClientClass)
tests/test_header_case_sensitivity.py:62
Methodtest_default_headers_replace_sdk_header_case_insensitively
(self, client_cls: ClientClass)
tests/test_header_case_sensitivity.py:54
Methodtest_default_query_option
(self)
tests/test_client.py:542
Methodtest_default_query_option
(self)
tests/test_client.py:1841
Methodtest_default_stream_cls
(self, respx_mock: MockRouter, client: Anthropic)
tests/test_client.py:1122
Methodtest_default_stream_cls
(self, respx_mock: MockRouter, async_client: AsyncAnthropic)
tests/test_client.py:2436
Methodtest_defaults
(self)
tests/lib/test_credentials.py:177
Functiontest_defaults_index_to_0
()
tests/lib/sessions/test_accumulate.py:89
Functiontest_defer_tool_call_changes_nothing_for_a_call_that_has_run
(setup: SetupFactory)
tests/lib/tools/test_runner_eager_tools.py:490
Functiontest_defer_tool_call_does_nothing_before_the_loop_starts_because_there_is_no_reply_yet
( setup: SetupFactory, )
tests/lib/tools/test_runner_eager_tools.py:474
Functiontest_defer_tool_call_lasts_for_one_reply
(setup: SetupFactory)
tests/lib/tools/test_runner_eager_tools.py:513
Functiontest_defer_tool_call_takes
(setup: SetupFactory, argument: str)
tests/lib/tools/test_runner_eager_tools.py:386
Functiontest_deferred_tool_calls_is_empty_once_generate_tool_call_response_has_run_the_held_calls
( setup: SetupFactory, )
tests/lib/tools/test_runner_eager_tools.py:621
Functiontest_deferred_tool_calls_lists_a_held_call_from_when_its_block_has_finished_streaming
( setup: SetupFactory, )
tests/lib/tools/test_runner_eager_tools.py:593
Functiontest_deferred_tool_calls_lists_the_held_calls_in_the_models_order_with_their_whole_input
( setup: SetupFactory, )
tests/lib/tools/test_runner_eager_tools.py:574
Functiontest_deferred_tool_calls_lists_the_held_calls_of_a_reply_that_is_cut_off
(setup: SetupFactory)
tests/lib/tools/test_runner_eager_tools.py:637
Functiontest_defers_the_calls_of_one_reply_only
(setup: SetupFactory)
tests/lib/tools/test_runner_eager_tools.py:458
Methodtest_delete
(self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:412
Methodtest_delete
(self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:947
Methodtest_delete_directory
(self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:427
Methodtest_delete_directory
(self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:962
Methodtest_delete_error_when_file_not_found
(self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool)
tests/lib/tools/memory_tools/test_filesystem.py:440
Methodtest_delete_error_when_file_not_found
( self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:975
Methodtest_delete_not_allow_deleting_memories_directory
( self, sync_local_filesystem_tool: BetaLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:446
Methodtest_delete_not_allow_deleting_memories_directory
( self, async_local_filesystem_tool: BetaAsyncLocalFilesystemMemoryTool )
tests/lib/tools/memory_tools/test_filesystem.py:983
Functiontest_denied_ask_call_does_not_block_idle_stop
A denied call counts as resolved in the reconcile idle accounting: history ends on an `end_turn` idle with the denied call unanswered (no resu
tests/lib/tools/test_session_runner.py:775
Functiontest_deny_after_end_turn_resumes_idle_stop
A `deny` that resolves the last held call must let the idle countdown resume: the session already went idle (`end_turn`) while the call was he
tests/lib/tools/test_session_runner.py:1102
Methodtest_deployment_bound_providers_implement_it
(self)
tests/lib/test_credentials.py:188
Functiontest_deprecated_alias
()
tests/test_models.py:471
Methodtest_deprecated_model_warning
(self, client: Anthropic)
tests/api_resources/test_messages.py:319
Methodtest_deprecated_model_warning
(self, async_client: AsyncAnthropic)
tests/api_resources/test_messages.py:758
Methodtest_deprecated_model_warning_stream
(self, respx_mock: MockRouter)
tests/lib/streaming/test_messages.py:276
Methodtest_deprecated_model_warning_stream
(self, respx_mock: MockRouter)
tests/lib/streaming/test_messages.py:499
Methodtest_deprecated_model_warning_stream
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:508
Methodtest_deprecated_model_warning_stream
(self, respx_mock: MockRouter)
tests/lib/streaming/test_beta_messages.py:693
Functiontest_derived_member_sets
()
tests/lib/tools/toolsets/test_registry.py:93
Methodtest_derives_base_url_from_region
(self)
tests/lib/test_bedrock_mantle.py:32
Methodtest_derives_from_region
(self, monkeypatch: pytest.MonkeyPatch)
tests/lib/test_aws_auth.py:386
← previousnext →4,501–4,600 of 9,455, ranked by callers