Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bojieli/ai-agent-book
/ functions
Functions
13,003 in github.com/bojieli/ai-agent-book
⨍
Functions
13,003
◇
Types & classes
1,574
↳
Endpoints
161
Function
test_mcnemar_paired_test_not_significant_when_no_discordance
McNemar test is not significant when both agents agree on every task. If baseline and evolved pass or fail the same tasks (b == c == 0), there is
tests/test_ch8_hermes_downstream_ablation.py:356
Function
test_mcp_client_telemetry_event
Test MCPClientTelemetryEvent structure.
chapter9/browser-use-rpa/browser-use/tests/ci/test_telemetry.py:119
Function
test_mcp_server_telemetry_event
Test MCPServerTelemetryEvent structure.
chapter9/browser-use-rpa/browser-use/tests/ci/test_telemetry.py:143
Function
test_mcp_server_telemetry_event_with_parent_process
Test MCPServerTelemetryEvent with parent_process_cmdline field.
chapter9/browser-use-rpa/browser-use/tests/ci/test_telemetry.py:244
Function
test_mcp_transport_reads_structured_results_and_closes_session
(monkeypatch)
chapter1/web-search-agent/tests/test_parallel_search.py:164
Function
test_measure_stream_records_usage_cache_reasoning_and_hash
()
chapter7/model-benchmark/test_campaign.py:79
Function
test_memory_basics
Test basic memory operations
chapter3/memobase/test_memory.py:18
Function
test_memory_compression
Test memory compression functionality
chapter3/memobase/test_memory.py:140
Function
test_memory_filters_omit_empty_agent_id
()
chapter3/mem0/test_agent_v3.py:34
Function
test_memory_is_durable_and_source_tagged_in_fresh_agent
(tmp_path: Path)
chapter2/prompt-injection/test_campaign.py:41
Function
test_memory_store
Test memory store operations
chapter3/memobase/test_memory.py:50
Function
test_memory_tools_empty_conversation_chunks
Contract: MemoryTools handles empty conversation chunks cleanly without raising ValueError.
tests/test_ch3_agentic_rag_empty_conversation_chunks.py:28
Function
test_merge_uses_stable_rule_id_not_detector_type
()
chapter9/ai-style-skill/test_pipeline.py:82
Function
test_message_bus_empty_types_subscription
()
tests/test_ch10_subscription_empty_types.py:34
Function
test_message_bus_publish_verbose_non_json_payload
Contract: MessageBus.publish in verbose mode logs without crashing on non-JSON payload.
tests/test_ch10_message_bus_non_json_payload.py:35
Method
test_message_creation
Test creating messages
chapter4/multimodal-agent/test_multimodal.py:43
Method
test_message_to_dict
Test converting message to dictionary
chapter4/multimodal-agent/test_multimodal.py:53
Method
test_metadata_consistency
Test that metadata is consistent across tool calls
chapter5/coding-agent/tests/test_integration.py:148
Function
test_mismatched_action_fact_is_rejected
(text)
tests/test_ch9_factual_grounding.py:38
Function
test_missing_bullets_still_works
()
chapter2/agent-skills-ppt/tests/test_generate_pptx_null_bullets.py:21
Function
test_missing_content_key_skipped
(tmp_path, monkeypatch, capsys)
chapter8/cot-distillation/test_analyze_null_assistant_content.py:44
Function
test_missing_dimension_fails_closed
()
chapter3/user-memory-evaluation/test_structured_rubric.py:62
Function
test_missing_dimension_still_zero
()
chapter9/self-evolution-eval/test_null_rubric_dimension.py:18
Function
test_missing_direct_response_fails
(tmp_path)
chapter6/end-to-end-speech/tests/test_validate_evidence.py:50
Function
test_missing_evidence_loses_evidence_point
()
chapter7/public-health-reporting-eval/tests/test_offline.py:39
Function
test_missing_extraction_rows_finds_omissions_across_batches
()
chapter3/structured-knowledge-extraction/test_extraction_coverage.py:4
Function
test_missing_extraction_rows_ignores_null_ids_and_empty_outputs
()
chapter3/structured-knowledge-extraction/test_extraction_coverage.py:14
Function
test_missing_heading_and_duplicate_chapters_fail
(tmp_path)
tests/test_homepage_index.py:58
Function
test_missing_key_error_names_the_variables
()
tests/test_providers.py:474
Function
test_missing_name_returns_error_not_keyerror
()
chapter2/agent-skills-ppt/tests/test_dispatch.py:19
Function
test_missing_object_rolls_back_and_next_delete_can_succeed
(store)
tests/test_ch5_pedo_atomic_delete.py:196
Function
test_missing_or_empty_records_fail_closed
()
chapter5/agent-creator/reference_agent/tests/test_domain_policy.py:59
Function
test_missing_path_returns_error_not_keyerror
()
chapter4/multimodal-agent/test_execute_tool_robust.py:44
Function
test_missing_payload_returns_error_not_keyerror
()
chapter2/agent-skills-ppt/tests/test_dispatch.py:27
Function
test_missing_query_returns_error_not_keyerror
()
chapter4/multimodal-agent/test_execute_tool_robust.py:37
Function
test_missing_required_arg_returns_error_string_not_crash
()
chapter10/multi-role-transfer/tests/test_tool_dispatch_errors.py:53
Method
test_missing_required_browser_session
Test that actions requiring browser_session fail appropriately when not provided
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:383
Method
test_missing_required_llm
Test that actions requiring page_extraction_llm fail appropriately when not provided
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:399
Function
test_missing_result_matches_null_result_score
()
chapter7/public-health-reporting-eval/tests/test_null_result.py:39
Function
test_missing_slowmo_factor_still_defaults
()
chapter5/video-edit/test_slowmo_null_factor.py:16
Function
test_missing_text_raises_clear_error
Item without a 'text' key must fail loudly with a clear message.
chapter8/sesame/test_batch_inference.py:61
Function
test_missing_top_level_key
()
chapter1/image-gen-workflow/tests/test_manifest_schema.py:58
Method
test_mixed_param_ordering
Should handle any ordering of action params and special params
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:818
Method
test_mixed_special_parameters
Test action with multiple special injected parameters
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:181
Function
test_mixed_vector_presence_consistent_scoring
Verify nodes with and without vectors are scored on a consistent scale (Finding 11).
tests/test_ch3_hybrid_structured_retriever.py:340
Function
test_mkdocs_pandoc_strip_empty_input
Prove that on_page_markdown handles empty input returning empty string.
tests/test_mkdocs_pandoc_strip_null.py:15
Function
test_mkdocs_pandoc_strip_none_input
Prove that on_page_markdown handles None input without raising TypeError.
tests/test_mkdocs_pandoc_strip_null.py:9
Function
test_mkdocs_yml_registers_the_hook
()
tests/test_mkdocs_figure_captions.py:168
Function
test_mock_channels_opt_in_still_succeeds
Regression: use_mock_channels=True preserves the original mock success behavior. Ensures the opt-in mock path still returns success=True for buil
tests/test_ch4_notification_dispatcher.py:622
Function
test_mock_marker_invalidates_an_apparent_success
()
chapter4/perception-tools/test_experiment_4_2.py:128
Function
test_mock_metrics_direction
()
chapter8/premature-completion-dpo/test_pipeline.py:148
Function
test_mock_mode_blocks_all_injections
()
tests/test_ch2_prompt_injection_robustness.py:86
Function
test_model_errors_propagate_without_fallback
()
chapter6/phone-agent/test_agent.py:135
Function
test_model_exception_and_builtin_callable
()
tests/test_ch7_evaluate_multilingual.py:194
Function
test_model_exception_and_builtin_callable
()
tests/test_ch8_evaluate_multilingual.py:194
Function
test_module_import_survives_malformed_env
Import-time class attributes must not raise on malformed env values.
chapter4/execution-tools/test_config_env.py:36
Function
test_module_level_validate_tool_call_entrypoint
()
tests/test_ch8_safety_policy_gate.py:206
Function
test_module_level_validate_tool_call_entrypoint
()
tests/test_ch9_safety_policy_gate.py:206
Function
test_module_reload_survives_malformed_env
模块级 TICK_REAL 在环境变量非法时不得抛出 ValueError。
chapter6/async-agent/tests/test_tasks_env.py:31
Function
test_monthly_interval_alias
()
chapter7/elo-leaderboard/tests/test_time_slices_monthly_interval.py:6
Function
test_moonshot_alias_resolves_to_kimi
(monkeypatch)
tests/test_providers.py:135
Function
test_move_copy_delete_are_real_verified_and_reversible
(tmp_path, monkeypatch)
chapter4/perception-tools/test_filesystem_mutations.py:22
Method
test_move_file
Test moving a file.
chapter4/execution-tools/test_filesystem_enhanced.py:251
Method
test_move_file_no_overwrite
Test move without overwrite.
chapter4/execution-tools/test_filesystem_enhanced.py:264
Method
test_move_history
Test getting move history.
chapter4/collaboration-tools/test_chess_tools.py:308
Function
test_mrr_first_relevant
()
tests/test_ch3_retrieval_stage_evaluator.py:129
Function
test_mrr_no_relevant_returns_zero
()
tests/test_ch3_retrieval_stage_evaluator.py:135
Function
test_multi_call_node_shape
()
chapter1/image-gen-workflow/tests/test_manifest_schema.py:105
Function
test_multi_channel_dispatch_all
Test unified multi-channel notification dispatching across mock channels.
tests/test_ch4_notification_dispatcher.py:24
Function
test_multi_risk_deadly_triad_high
Network plus file write (data exfiltration) is classified as high.
tests/test_ch5_sandbox_evaluator.py:169
Method
test_multi_violation_trajectory
A trajectory with several violation types detects all of them.
tests/test_ch8_trajectory_consistency_checker.py:298
Method
test_multi_violation_trajectory
A trajectory with several violation types detects all of them.
tests/test_ch9_trajectory_consistency_checker.py:298
Function
test_multi_week_span_still_produces_buckets
A span covering multiple weeks still yields intermediate buckets.
chapter7/elo-leaderboard/tests/test_time_slices_short_span.py:39
Method
test_multidimensional_report_is_more_diagnostic_than_scalar
(self)
chapter9/trajectory-verifier/test_verifier.py:23
Method
test_multiline_content
Test writing multiline content
chapter5/coding-agent/tests/test_write_tool.py:61
Method
test_multiline_mode
Test multiline mode
chapter5/coding-agent/tests/test_grep_tool.py:174
Method
test_multiline_replacement
Test replacing multiline strings
chapter5/coding-agent/tests/test_edit_tool.py:113
Method
test_multiline_source
Test editing with multiline source
chapter5/coding-agent/tests/test_notebook_edit_tool.py:143
Method
test_multiple_commands_with_and
Test multiple commands with && operator
chapter5/coding-agent/tests/test_bash_tool.py:130
Method
test_multiple_commands_with_semicolon
Test multiple commands separated by semicolon
chapter5/coding-agent/tests/test_bash_tool.py:119
Method
test_multiple_edits
Test multiple edits in one operation
chapter5/coding-agent/tests/test_multi_edit_tool.py:14
Method
test_multiple_ignore_patterns
Test multiple ignore patterns
chapter5/coding-agent/tests/test_ls_tool.py:90
Function
test_multiple_new_tabs_cdp_session
Test creating multiple new tabs in succession.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_session_via_cdp_tab_management.py:90
Method
test_multiple_requests
Test that multiple requests are rate-limited.
chapter4/perception-tools/test_pubchem_tools.py:295
Function
test_mutations_fail_closed_without_explicit_root
(tmp_path, monkeypatch)
chapter4/perception-tools/test_filesystem_mutations.py:72
Function
test_mutations_have_hash_receipts_and_escape_attempts_failed_closed
()
chapter4/perception-tools/test_real_experiment_4_2_evidence.py:58
Function
test_mutations_reject_symlinks_that_escape_root
(tmp_path, monkeypatch)
chapter4/perception-tools/test_filesystem_mutations.py:58
Function
test_mutations_reject_traversal_absolute_paths_and_root
(candidate, tmp_path, monkeypatch)
chapter4/perception-tools/test_filesystem_mutations.py:50
Function
test_n_jobs_larger_than_rows
()
chapter7/elo-leaderboard/tests/test_filter_data_parallel_small.py:9
Method
test_naive_action_count_false_success_is_detected
(self)
chapter9/browser-use-rpa/test_real_playwright_campaign.py:48
Function
test_naive_carries_foreign_credential
()
chapter5/provider-failover/tests/test_offline.py:40
Function
test_naive_puts_foreign_thinking_into_the_thinking_slot
直传臂之所以会被验签挡住,就是因为它把别家的思考塞回了 thinking 槽位。
chapter5/provider-failover/tests/test_offline.py:46
Function
test_named_user_password_still_redacted
()
chapter3/log-sanitization/tests/test_url_credential_empty_user.py:19
Method
test_names_that_previously_worked_still_work
(self)
chapter1/context/tests/test_calc_sandbox.py:103
Function
test_native_anthropic_adapter_records_cache_and_ttft
()
chapter7/model-benchmark/test_campaign.py:231
Function
test_native_cost_uses_observed_cached_split
()
chapter5/agent-creator/test_creator.py:277
Function
test_native_currency_pricing_tracks_cached_and_uncached_without_fx
()
chapter7/user-memory-system-evaluation/test_experiment.py:264
Function
test_native_gemini_adapter_records_thought_tokens
()
chapter7/model-benchmark/test_campaign.py:249
Function
test_native_moonshot_reasoning_effort_uses_supported_top_level_control
()
chapter8/cot-distillation/test_empty_problems.py:54
Function
test_native_s1_nonverbal_events_not_onomatopoeia
()
chapter6/controllable-tts/test_fish_s1.py:12
← previous
next →
11,501–11,600 of 13,003, ranked by callers