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_normal_edits_pass
合法参数不受影响。
chapter5/conversational-ui/test_customize_malformed_args.py:43
Function
test_normal_edits_unchanged
(frontend_dir)
chapter5/conversational-ui/test_customize_non_dict_file_item.py:38
Function
test_normal_list_unchanged
()
chapter4/perception-tools/test_parse_page_range_trailing_comma.py:28
Function
test_normal_two_message_row_still_scored
(tmp_path, monkeypatch, capsys)
chapter8/cot-distillation/test_analyze_short_messages.py:41
Function
test_normalize_does_not_hide_an_explicitly_wrong_timezone
()
chapter2/local_llm_serving/test_run_experiment.py:32
Function
test_normalize_language
()
tests/test_ch7_evaluate_multilingual.py:19
Function
test_normalize_language
()
tests/test_ch8_evaluate_multilingual.py:19
Function
test_normalize_small_model_city_arguments
()
chapter2/local_llm_serving/test_run_experiment.py:15
Function
test_normalized_judgment_must_match_raw_provider_response
(tmp_path)
chapter8/MiniMind-pretrain/validation/test_vlm_training_report_audit.py:141
Function
test_normalizes_bare_tool_array
()
chapter5/agent-creator/test_creator.py:168
Method
test_not_a_directory
Test error when path is a file not directory
chapter5/coding-agent/tests/test_ls_tool.py:170
Method
test_not_a_directory
Test with a file path instead of directory
chapter5/coding-agent/tests/test_glob_tool.py:84
Method
test_not_a_file_error
Test reading a directory instead of file
chapter5/coding-agent/tests/test_read_tool.py:184
Function
test_notebook_edit_accepts_integer_zero_cell_id
(temp_notebook)
tests/test_ch5_notebook_edit_zero_cell_id.py:36
Method
test_notebook_not_found
Test error when notebook doesn't exist
chapter5/coding-agent/tests/test_notebook_edit_tool.py:177
Method
test_notification_readiness_requires_every_channel_input
(self)
chapter4/collaboration-tools/test_run_experiment_4_5.py:46
Method
test_nuke
Test filesystem destruction.
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:752
Function
test_null_and_dict_issues_still_work
()
chapter10/book-translation/tests/test_non_dict_issue_item.py:20
Function
test_null_assistant_content_skipped
(tmp_path, monkeypatch, capsys)
chapter8/cot-distillation/test_analyze_null_assistant_content.py:9
Function
test_null_bullets_like_omit
()
chapter2/agent-skills-ppt/tests/test_generate_pptx_null_bullets.py:7
Method
test_null_context_after_like_omit
Explicit JSON null -A must behave like omit (default 0).
chapter5/coding-agent/tests/test_grep_tool.py:251
Method
test_null_context_around_like_omit
Explicit JSON null -C must behave like omit (default 0).
chapter5/coding-agent/tests/test_grep_tool.py:263
Method
test_null_context_before_like_omit
Explicit JSON null -B must behave like omit (default 0).
chapter5/coding-agent/tests/test_grep_tool.py:239
Function
test_null_edit_item_skipped_with_warning
()
chapter9/prompt-auto-optimization/test_non_dict_edit.py:19
Function
test_null_edits_like_empty
()
chapter9/prompt-auto-optimization/tests/test_edits_list_null.py:4
Method
test_null_edits_like_empty
Explicit JSON null edits must behave like an empty list.
chapter5/coding-agent/tests/test_multi_edit_tool.py:231
Function
test_null_edits_list_still_empty
()
chapter9/prompt-auto-optimization/test_non_dict_edit.py:30
Function
test_null_evidence_loses_evidence_point
()
chapter7/public-health-reporting-eval/tests/test_offline.py:47
Function
test_null_issues_like_empty
()
chapter5/paper-to-ppt/test_null_issues.py:14
Function
test_null_issues_like_empty
()
chapter10/book-translation/tests/test_null_issues.py:5
Function
test_null_issues_like_empty
()
chapter10/staged-system-prompt/tests/test_null_issues.py:8
Function
test_null_language_code_interpreter_defaults
Public MCP path: ExecutionTools.code_interpreter(language=None).
chapter4/execution-tools/test_null_language.py:19
Function
test_null_language_executor_defaults_to_python
()
chapter4/execution-tools/test_null_language.py:11
Function
test_null_numeric_fields_coerced
()
tests/test_ch6_cost_efficiency_analyzer.py:165
Function
test_null_numeric_fields_coerced
()
tests/test_ch7_cost_efficiency_analyzer.py:165
Method
test_null_offset_and_limit
JSON null offset/limit must use defaults (agent omits optional numbers).
chapter5/coding-agent/tests/test_read_tool.py:195
Function
test_null_output_falls_back_to_default_filename
Explicit JSON null 'output' must use the generated default filename.
chapter8/sesame/test_batch_inference.py:73
Method
test_null_path_like_omit
Explicit JSON null path must behave like omit (default search root).
chapter5/coding-agent/tests/test_grep_tool.py:275
Method
test_null_path_like_omit
Explicit JSON null path must behave like omit (cwd / search root).
chapter5/coding-agent/tests/test_glob_tool.py:122
Function
test_null_pii_values_returns_empty_list
()
chapter3/log-sanitization/tests/test_null_pii_values.py:8
Function
test_null_result_scores_without_attribute_error
()
chapter7/public-health-reporting-eval/tests/test_null_result.py:25
Function
test_null_rubric_dimension_coerced
()
chapter9/self-evolution-eval/test_null_rubric_dimension.py:7
Function
test_null_slowmo_factor_skipped_in_plan_fields
()
chapter5/video-edit/test_slowmo_null_factor.py:7
Method
test_null_timeout_like_omit
Explicit JSON null timeout must behave like omit (default 120s).
chapter5/coding-agent/tests/test_bash_tool.py:177
Method
test_null_todos_like_empty
Explicit JSON null todos must behave like an empty list.
chapter5/coding-agent/tests/test_todo_write_tool.py:129
Function
test_num_results_garbage_string_falls_back
(monkeypatch)
chapter9/self-evolving-tools/test_web_search_num_results.py:26
Function
test_num_results_normal_still_clamped
(monkeypatch)
chapter9/self-evolving-tools/test_web_search_num_results.py:33
Function
test_num_results_null_falls_back
(monkeypatch)
chapter9/self-evolving-tools/test_web_search_num_results.py:18
Method
test_numeric_contradiction_detected
Same subject with different numbers is a numeric contradiction.
tests/test_ch8_trajectory_consistency_checker.py:112
Method
test_numeric_contradiction_detected
Same subject with different numbers is a numeric contradiction.
tests/test_ch9_trajectory_consistency_checker.py:112
Function
test_numeric_dict_value_becomes_none
()
chapter3/structured-knowledge-extraction/test_normalize_numeric.py:18
Function
test_numeric_list_value_becomes_none
()
chapter3/structured-knowledge-extraction/test_normalize_numeric.py:13
Function
test_numeric_null_stays_none
()
chapter3/structured-knowledge-extraction/test_normalize_numeric.py:33
Function
test_numeric_plain_int_unchanged
()
chapter3/structured-knowledge-extraction/test_normalize_numeric.py:28
Function
test_numeric_string_extracts_digits
()
chapter3/structured-knowledge-extraction/test_normalize_numeric.py:23
Function
test_numeric_tests_unchanged
(tmp_path)
chapter7/public-health-reporting-eval/tests/test_blank_csv_int.py:57
Function
test_object_model_and_method_invocations
()
tests/test_ch7_evaluate_multilingual.py:153
Function
test_object_model_and_method_invocations
()
tests/test_ch8_evaluate_multilingual.py:153
Method
test_object_obfuscation_shapes
(self)
chapter1/context/tests/test_calc_sandbox.py:60
Function
test_object_retains_extra_metadata
()
chapter9/self-evolving-tools/test_normalize_schema_bare_object.py:44
Function
test_object_with_properties_unchanged
()
chapter9/self-evolving-tools/test_normalize_schema_bare_object.py:21
Function
test_object_with_required_keeps_required_not_as_property
()
chapter9/self-evolving-tools/test_normalize_schema_bare_object.py:13
Method
test_observation_grounds_claim
An observation string can ground a subsequent claim.
tests/test_ch8_trajectory_consistency_checker.py:58
Method
test_observation_grounds_claim
An observation string can ground a subsequent claim.
tests/test_ch9_trajectory_consistency_checker.py:58
Function
test_observations_are_read_from_what_was_sent
()
chapter1/context/test_grounding.py:50
Function
test_official_acceptance_and_latest_pointer_are_consistent_and_credential_free
()
chapter10/parallel-web-research/test_official_experiment.py:60
Function
test_official_acceptance_latest_and_credential_scan_are_consistent
()
chapter10/multi-role-transfer/test_official_experiment.py:60
Function
test_official_latest_and_credential_scan_are_consistent
()
chapter6/streaming-speech/test_official_experiment.py:70
Function
test_official_manifest_binds_artifacts_and_runtime_sources
()
chapter10/parallel-web-research/test_official_experiment.py:21
Function
test_official_manifest_binds_artifacts_and_runtime_sources
()
chapter10/multi-role-transfer/test_official_experiment.py:21
Function
test_official_manifest_binds_artifacts_sources_audio_and_local_checkpoints
()
chapter6/streaming-speech/test_official_experiment.py:19
Function
test_official_moonshot_receipts_are_raw_hashed_and_unique
()
chapter10/multi-role-transfer/test_official_experiment.py:34
Function
test_official_receipts_are_raw_hashed_and_cover_all_three_phases
()
chapter10/parallel-web-research/test_official_experiment.py:34
Function
test_official_run_retains_raw_prefixes_and_negative_manuscript_results
()
chapter6/streaming-speech/test_official_experiment.py:48
Function
test_official_tavily_receipts_retain_raw_bodies_without_credentials
()
chapter10/multi-role-transfer/test_official_experiment.py:48
Function
test_offline_and_real_llm_evidence_are_explicitly_non_acceptance
()
chapter10/voice-werewolf/test_exp106_validation_evidence.py:24
Function
test_offline_cli_extracts_only_the_destination
Trip-type modifiers must not become part of the submitted destination.
chapter5/dynamic-form/test_round_trip_destination.py:35
Function
test_offline_cli_uses_default_question_when_query_is_omitted
(capsys)
chapter1/web-search-agent/tests/test_main.py:80
Function
test_offline_cli_writes_utf8_json_without_api_credentials
(tmp_path, capsys)
chapter1/web-search-agent/tests/test_main.py:55
Function
test_offline_demo_quiet_mode_prints_nothing
(capsys)
chapter1/web-search-agent/tests/test_offline_demo.py:34
Function
test_offline_demo_returns_a_complete_deterministic_trace
()
chapter1/web-search-agent/tests/test_offline_demo.py:6
Function
test_offline_demo_verbose_mode_prints_each_trace_step
(capsys)
chapter1/web-search-agent/tests/test_offline_demo.py:23
Method
test_offset_and_limit
Test offset and limit parameters for large files
chapter5/coding-agent/tests/test_read_tool.py:44
Method
test_old_budget_fails
(self)
chapter6/astra-async-steering/test_judging.py:65
Method
test_old_budget_fails
(self)
chapter6/astra-async-steering/validation/runs/exp6-14-20260905-formal/source/test_judging.py:65
Function
test_ollama_needs_no_key
()
tests/test_providers.py:456
Function
test_omitted_head_limit_still_unlimited
(system_state, sample_files)
chapter5/coding-agent/tests/test_grep_head_limit_zero.py:33
Function
test_on_post_build_is_a_noop_without_an_index
(tmp_path)
tests/test_split_search_index.py:127
Function
test_on_post_build_leaves_index_alone_without_edition_pages
A build with no book editions (e.g. a docs-only preview) must not lose search.
tests/test_split_search_index.py:134
Function
test_on_post_build_splits_by_edition
(tmp_path)
tests/test_split_search_index.py:80
Method
test_one_label_per_token_is_preserved
(self)
chapter2/attention_visualization/test_token_labels.py:92
Function
test_only_required_nonpassing_records_block_approval
()
chapter5/agent-creator/reference_agent/tests/test_domain_policy.py:46
Function
test_only_the_first_tool_call_of_a_turn_is_tracked
一轮里并行发出多个调用时,只跟第一个——否则参数会被串成一团。
chapter5/provider-failover/tests/test_offline.py:179
Method
test_openai_ainvoke_normal
Test normal text response from OpenAI
chapter9/browser-use-rpa/browser-use/browser_use/llm/tests/test_chat_models.py:58
Method
test_openai_ainvoke_structured
Test structured output from OpenAI
chapter9/browser-use-rpa/browser-use/browser_use/llm/tests/test_chat_models.py:73
Function
test_openai_default_is_gpt_5_6_sol
()
chapter9/ai-style-skill/test_pipeline.py:203
Method
test_openrouter_ainvoke_normal
Test normal text response from OpenRouter
chapter9/browser-use-rpa/browser-use/browser_use/llm/tests/test_chat_models.py:222
Method
test_openrouter_ainvoke_structured
Test structured output from OpenRouter
chapter9/browser-use-rpa/browser-use/browser_use/llm/tests/test_chat_models.py:236
Function
test_openrouter_backend_never_carries_an_empty_key
The OpenRouter builder must apply the placeholder too. Covers ``build_openrouter_backend`` directly: the test above now reaches the plain-pro
tests/test_providers.py:739
Function
test_openrouter_default_model_honours_openrouter_model_env
resolve_backend("openrouter") with no explicit model must use OPENROUTER_MODEL (the documented ':free' zero-cost selector), not the paid OPENR
tests/test_providers.py:827
← previous
next →
11,701–11,800 of 13,003, ranked by callers