MCPcopy Create free account

hub / github.com/bojieli/ai-agent-book / functions

Functions13,003 in github.com/bojieli/ai-agent-book

Functiontest_tokens_per_tool_call_aggregate
()
tests/test_ch6_cost_efficiency_analyzer.py:198
Functiontest_tokens_per_tool_call_aggregate
()
tests/test_ch7_cost_efficiency_analyzer.py:198
Functiontest_tokens_per_tool_call_zero_when_no_tools
()
tests/test_ch6_cost_efficiency_analyzer.py:208
Functiontest_tokens_per_tool_call_zero_when_no_tools
()
tests/test_ch7_cost_efficiency_analyzer.py:208
Methodtest_tool_call_statistics_in_hint
Test that tool calls are tracked in system hint
chapter5/coding-agent/tests/test_integration.py:26
Functiontest_tool_calls_explicit_field_overrides_tool_presence
()
tests/test_ch6_cost_efficiency_analyzer.py:147
Functiontest_tool_calls_explicit_field_overrides_tool_presence
()
tests/test_ch7_cost_efficiency_analyzer.py:147
Functiontest_tool_calls_zero_when_no_tool
()
tests/test_ch6_cost_efficiency_analyzer.py:153
Functiontest_tool_calls_zero_when_no_tool
()
tests/test_ch7_cost_efficiency_analyzer.py:153
Functiontest_tool_definition_is_available_for_moonshot_only
()
chapter1/web-search-agent/tests/test_agent.py:72
Methodtest_tool_execution
Test tool execution
chapter1/context/tests/test_agent.py:153
Functiontest_tool_items_handles_null_response
Contract: _tool_items returns empty list for None or non-dict response.
tests/test_ch1_search_codegen_null_response.py:24
Methodtest_tool_name_casing_normalization
(self)
chapter9/harness-safety-gate/test_safety_policy_gate.py:175
Functiontest_tool_protocol_rejects_non_tool_between_call_and_result
()
chapter2/system-hint/test_experiment_2_8.py:38
Functiontest_tool_targets_are_valid_json_and_direct_targets_are_exact
()
chapter8/exact-copy-sft/tests/test_copy_pipeline.py:31
Methodtest_tool_warning_after_three_calls
Test that system hint warns after 3+ tool calls
chapter5/coding-agent/tests/test_integration.py:38
Functiontest_tools_are_deterministic
()
chapter5/provider-failover/tests/test_offline.py:166
Methodtest_tools_initialization
Test tools initialization
chapter4/multimodal-agent/test_multimodal.py:187
Functiontest_tools_off_disables_tool_execution
()
chapter4/multimodal-agent/test_interactive_tools_toggle.py:31
Functiontest_tools_on_configures_complete_tool_state
()
chapter4/multimodal-agent/test_interactive_tools_toggle.py:19
Functiontest_top_k
Test that different top_k values return the correct number of results
chapter3/agentic-rag-for-user-memory/test_top_k.py:17
Functiontest_top_k
Test that different top_k values return the correct number of results
chapter3/contextual-retrieval-for-user-memory/test_top_k.py:17
Functiontest_top_k_zero
Verify top_k=0 returns empty results list.
tests/test_ch3_hybrid_structured_retriever.py:272
Functiontest_top_k_zero_returns_empty_list
Verify that top_k == 0 returns an empty list immediately.
chapter3/structured-index/test_hybrid_retriever.py:104
Methodtest_trace_computes_pre_edit_boundary
(self)
chapter7/model-action-threshold/tests/test_experiment.py:22
Functiontest_trailing_comma_does_not_raise
()
chapter4/perception-tools/test_parse_page_range_trailing_comma.py:16
Methodtest_trajectory_reset
Test trajectory reset
chapter1/context/tests/test_agent.py:165
Functiontest_trajectory_verifier_handles_empty_dimensions
()
chapter9/trajectory-verifier/test_empty_dimensions_score.py:8
Methodtest_transcript_structure
Test the structure of transcript data.
chapter4/perception-tools/test_youtube_tools.py:216
Functiontest_transfer_efficiency_none_accuracy
()
tests/test_ch7_evaluate_multilingual.py:277
Functiontest_transfer_efficiency_none_accuracy
()
tests/test_ch8_evaluate_multilingual.py:277
Functiontest_transfer_efficiency_zero_reference
()
tests/test_ch7_evaluate_multilingual.py:183
Functiontest_transfer_efficiency_zero_reference
()
tests/test_ch8_evaluate_multilingual.py:183
Functiontest_translation_unit_split_never_changes_source_or_cuts_fences
()
chapter10/book-translation/test_official_experiment.py:75
Methodtest_trigger_rollback_failure
(self)
chapter9/harness-safety-gate/test_safety_policy_gate.py:223
Methodtest_trigger_rollback_success
(self)
chapter9/harness-safety-gate/test_safety_policy_gate.py:216
Functiontest_truly_empty_file_still_warns
(system_state, temp_dir)
chapter5/coding-agent/tests/test_read_limit_zero.py:19
Functiontest_truncated_reply_cannot_be_recorded_as_a_selection
()
chapter4/active-tool-discovery/test_selection_ablation.py:47
Functiontest_truncated_rsa_pem_without_end_redacted
()
chapter3/log-sanitization/tests/test_truncated_pem.py:9
Functiontest_try_finally_cleanup_on_dispatch_exception
Test that pending requests and decision events are cleaned up even if dispatch raises an exception.
tests/test_ch4_notification_dispatcher.py:320
Functiontest_turn_id_from_step_string
()
tests/test_ch6_cost_efficiency_analyzer.py:159
Functiontest_turn_id_from_step_string
()
tests/test_ch7_cost_efficiency_analyzer.py:159
Methodtest_txt_file_creation
Test TxtFile creation and basic properties.
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:35
Methodtest_type1_with_multiple_special_params
Type 1 with multiple special params should work
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:578
Methodtest_type1_with_param_model
Type 1: action(params: Model, special_args...) should work
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:551
Methodtest_type2_no_action_params
Type 2 with only special params should work
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:629
Methodtest_type2_simple_action
Type 2: action(arg1, arg2, special_args...) should work
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:598
Methodtest_type2_with_defaults
Type 2 with default values should preserve defaults
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:615
Methodtest_type_filtering
Test type parameter for file type filtering
chapter5/coding-agent/tests/test_grep_tool.py:134
Functiontest_uberllm_base_url_override
(monkeypatch)
tests/test_providers.py:316
Functiontest_uberllm_key_uses_multi_model_gateway_directly
(monkeypatch)
tests/test_providers.py:291
Functiontest_uberllm_namespaces_bare_model_ids
(monkeypatch)
tests/test_providers.py:301
Functiontest_uint8_energy_normalization
Verify uint8 PCM energy is normalized to [-1, 1).
tests/test_ch6_interruption_manager.py:171
Functiontest_uint8_energy_normalization
Verify uint8 PCM energy is normalized to [-1, 1).
tests/test_ch9_interruption_manager.py:171
Functiontest_uint8_normalization_around_128
Verify 8-bit unsigned audio is normalized around 128 correctly.
tests/test_ch6_interruption_manager.py:243
Functiontest_uint8_normalization_around_128
Verify 8-bit unsigned audio is normalized around 128 correctly.
tests/test_ch9_interruption_manager.py:243
Functiontest_unannotated_math_and_source_text_survive
(tmp_path, monkeypatch)
scripts/test_kindle_epub_patcher.py:11
Functiontest_unapproved_commands_are_rejected_before_execution
()
chapter6/async-agent/test_real_tasks.py:20
Methodtest_unary_minus
(self)
chapter1/context/tests/test_calc_sandbox.py:40
Methodtest_unbounded_tools_are_rejected
(self)
chapter6/gemini-xlerobot-navigation/test_validator.py:26
Functiontest_unconfigured_production_channel_fails_explicitly
Regression: an unconfigured production channel must fail explicitly, not silently succeed. Closes the class where mock channels reported success
tests/test_ch4_notification_dispatcher.py:577
Functiontest_unconfigured_webhook_fails_explicitly
Regression: webhook channel without webhook_url in channel_config must fail explicitly.
tests/test_ch4_notification_dispatcher.py:593
Methodtest_undo_move
Test undoing a move.
chapter4/collaboration-tools/test_chess_tools.py:277
Methodtest_undo_no_moves
Test undoing when no moves have been made.
chapter4/collaboration-tools/test_chess_tools.py:296
Functiontest_unexpected_phone_failure_cancels_peer_and_closes_channel
()
chapter10/autonomous-phone-registration/test_orchestration.py:116
Functiontest_unfinished_status_raises
A non-finished data.status (with no audio) raises rather than returning empty audio.
chapter7/tts-quality-eval/test_minimax_t2a_refresh.py:97
Methodtest_ungrounded_claims_flagged
A claim with no supporting evidence is flagged as ungrounded.
tests/test_ch8_trajectory_consistency_checker.py:77
Methodtest_ungrounded_claims_flagged
A claim with no supporting evidence is flagged as ungrounded.
tests/test_ch9_trajectory_consistency_checker.py:77
Functiontest_unhashable_evidence_in_result
()
chapter7/public-health-reporting-eval/tests/test_null_result.py:54
Functiontest_unhashable_evidence_remains_order_independent
()
chapter7/public-health-reporting-eval/tests/test_null_result.py:62
Functiontest_unhashable_target_role_in_transfer_to_agent_returns_error_string_not_crash
Regression test: when transfer_to_agent receives an unhashable target_role (e.g. list or dict), the orchestrator must not crash with TypeError: un
tests/test_ch10_multi_role_transfer_unhashable_target.py:44
Methodtest_unicode_casefold_and_duplicate_detection
(self)
chapter7/model-action-threshold/tasks/crosscutting_identity/repo/tests/test_accounts.py:27
Methodtest_unicode_content
Test writing Unicode content
chapter5/coding-agent/tests/test_write_tool.py:106
Methodtest_uniqueness_check
Test that Edit fails if old_string is not unique (without replace_all)
chapter5/coding-agent/tests/test_edit_tool.py:64
Functiontest_unknown_int_dtype_uses_value_range_scale
Regression: unknown integer dtypes must use a standard scale based on value range, not chunk max, so relative volume is preserved.
tests/test_ch6_interruption_manager.py:257
Functiontest_unknown_int_dtype_uses_value_range_scale
Regression: unknown integer dtypes must use a standard scale based on value range, not chunk max, so relative volume is preserved.
tests/test_ch9_interruption_manager.py:257
Functiontest_unknown_model_falls_back_to_default_when_openrouter_model_env_is_empty
Empty or whitespace OPENROUTER_MODEL must fall back to the package default. Locks out regression where OPENROUTER_MODEL set to empty string or wh
tests/test_providers.py:101
Functiontest_unknown_model_falls_back_to_openrouter_model_env
Substituting a working default is opt-in, for callers that cannot send an unmapped id at all.
tests/test_providers.py:92
Functiontest_unknown_model_is_kept_when_not_substituting
Rerouting for credential reasons keeps the model the reader asked for.
chapter1/web-search-agent/tests/test_config.py:36
Functiontest_unknown_model_is_returned_unchanged_by_default
The default keeps the reader's model id, so an unhosted one is rejected by name rather than silently answered by a different vendor's model.
tests/test_providers.py:111
Functiontest_unknown_model_uses_configured_openrouter_default
Substitution is opt-in, for callers that cannot send an unmapped id.
chapter1/web-search-agent/tests/test_config.py:28
Functiontest_unknown_outcome_falls_back_to_tie
An unrecognized label degrades to a tie rather than NaN.
chapter7/elo-leaderboard/tests/test_tie_bothbad.py:41
Functiontest_unknown_provider_lists_supported_ones
()
tests/test_providers.py:483
Functiontest_unknown_requirement_id
()
chapter1/image-gen-workflow/tests/test_manifest_schema.py:70
Functiontest_unknown_tool_still_reported
()
chapter4/multimodal-agent/test_execute_tool_robust.py:65
Functiontest_unknown_tool_still_returns_error
()
chapter2/agent-skills-ppt/tests/test_dispatch.py:35
Functiontest_unparsed_change_date_requires_review
()
tests/test_ch9_factual_grounding.py:91
Functiontest_unquoted_secret_still_redacted
()
chapter3/log-sanitization/tests/test_quoted_secret_spaces.py:20
Functiontest_unrelated_bad_requests_are_not_swallowed
()
chapter2/agent-skills-ppt/tests/test_reasoning_degrade.py:80
Methodtest_unsafe_candidate_is_not_executed_during_validation
(self)
chapter9/self-modifying-agent/test_evolution.py:95
Methodtest_unsafe_candidate_is_rejected_before_execution
(self)
chapter9/harness-safety-gate/test_evolution.py:212
Functiontest_unsafe_domain_patterns
Test that unsafe domain patterns are rejected
chapter9/browser-use-rpa/browser-use/tests/ci/test_agent_sensitive_data.py:135
Functiontest_unsupported_claim_loses_grounding_point
()
chapter7/public-health-reporting-eval/tests/test_offline.py:56
Methodtest_unsupported_conclusion_flagged
A final answer with no evidence support is flagged.
tests/test_ch8_trajectory_consistency_checker.py:183
Methodtest_unsupported_conclusion_flagged
A final answer with no evidence support is flagged.
tests/test_ch9_trajectory_consistency_checker.py:183
Functiontest_unsupported_list_means_the_same_thing_in_every_branch
()
chapter1/context/test_grounding.py:109
Functiontest_unverifiable_detail_requires_review
(text, result, arguments)
tests/test_ch9_factual_grounding.py:75
Methodtest_unwhitelisted_names_and_calls
(self)
chapter1/context/tests/test_calc_sandbox.py:72
Functiontest_update
(store, writer_ctx, reader_ctx)
chapter5/permission-embedded-data-objects/tests/test_core.py:79
Methodtest_update_file_content
Test updating a line in file.
chapter4/execution-tools/test_terminal_controller.py:185
← previousnext →12,601–12,700 of 13,003, ranked by callers