MCPcopy Create free account

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

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

Functiontest_simulated_user_cli_needs_no_human_consent
(monkeypatch)
chapter10/voice-werewolf/test_user_simulator.py:214
Functiontest_simulated_user_is_one_randomized_protected_user_seat
()
chapter10/voice-werewolf/test_user_simulator.py:49
Functiontest_simulator_fails_closed_when_abstention_is_not_explicit_in_asr
(monkeypatch)
chapter10/voice-werewolf/test_user_simulator.py:107
Functiontest_simulator_fails_closed_when_asr_changes_selected_action
(monkeypatch)
chapter10/voice-werewolf/test_user_simulator.py:91
Functiontest_simulator_uses_private_context_tool_and_only_asr_speech
(monkeypatch)
chapter10/voice-werewolf/test_user_simulator.py:67
Functiontest_simulator_vote_prompt_uses_the_same_evidence_priority
(monkeypatch)
chapter10/voice-werewolf/test_user_simulator.py:171
Functiontest_simultaneous_deaths_returns_undecided_faction
Contract proved: Judge._check_winner returns Faction.UNDECIDED when all wolves and good players die simultaneously. Bug locked out: returning Fact
chapter10/voice-werewolf/test_simultaneous_deaths_consensus.py:6
Functiontest_single_agent_progress_resumes_without_replaying_prefix
(tmp_path, monkeypatch)
chapter10/book-translation/test_official_experiment.py:102
Functiontest_single_example
()
tests/test_ch8_sft_data_auditor.py:289
Functiontest_single_example
()
tests/test_ch7_sft_data_auditor.py:289
Methodtest_single_file_search
Test searching a single file
chapter5/coding-agent/tests/test_grep_tool.py:227
Functiontest_single_object_unchanged
()
chapter5/video-edit/test_extract_json_adjacent.py:16
Functiontest_single_quoted_password_with_spaces
()
chapter3/log-sanitization/tests/test_quoted_secret_spaces.py:13
Methodtest_single_step_no_evidence
A single step with an ungrounded claim is flagged.
tests/test_ch8_trajectory_consistency_checker.py:283
Methodtest_single_step_no_evidence
A single step with an ungrounded claim is flagged.
tests/test_ch9_trajectory_consistency_checker.py:283
Functiontest_single_step_parametrized
Test single step with different LLM providers using pytest parametrize.
chapter9/browser-use-rpa/browser-use/browser_use/llm/tests/test_single_step.py:117
Methodtest_single_step_trajectory
A single step with a grounded claim and no final answer works.
tests/test_ch8_trajectory_consistency_checker.py:267
Methodtest_single_step_trajectory
A single step with a grounded claim and no final answer works.
tests/test_ch9_trajectory_consistency_checker.py:267
Functiontest_single_turn
()
tests/test_ch6_cost_efficiency_analyzer.py:381
Functiontest_single_turn
()
tests/test_ch7_cost_efficiency_analyzer.py:381
Functiontest_single_vendor_provider_does_not_namespace_models
The converse: a non-aggregator must receive the id it was given.
tests/test_providers.py:717
Functiontest_single_zero_cost_turn_not_expensive
A single zero-cost turn with a tool call stays productive, not expensive.
tests/test_ch6_cost_efficiency_analyzer.py:449
Functiontest_single_zero_cost_turn_not_expensive
A single zero-cost turn with a tool call stays productive, not expensive.
tests/test_ch7_cost_efficiency_analyzer.py:449
Methodtest_size_tracking
Test old_size and new_size tracking
chapter5/coding-agent/tests/test_multi_edit_tool.py:215
Functiontest_skill_catalog_and_bodies_are_complete
()
chapter10/multi-role-transfer/tests/test_skill_comparison.py:9
Functiontest_skill_harness_requires_load_and_enforces_loaded_tool_boundary
()
chapter10/multi-role-transfer/tests/test_skill_comparison.py:21
Functiontest_skill_md_describes_llm_judge_and_structure
(tmp_path)
chapter9/ai-style-skill/test_pipeline.py:191
Functiontest_skips_scenario_without_spans
()
tests/test_ch6_cost_efficiency_analyzer.py:94
Functiontest_skips_scenario_without_spans
()
tests/test_ch7_cost_efficiency_analyzer.py:94
Functiontest_slash_division_with_units_and_formatting
()
chapter8/Intuitor/tests/test_normalize_frac_formatting.py:23
Functiontest_slide_count_matches_slidev_frontmatter_and_separators
()
chapter5/paper-to-ppt/test_page_contract.py:19
Functiontest_slide_sections_map_to_rendered_pages
()
chapter5/paper-to-video/test_campaign.py:15
Functiontest_small_numbers_are_not_evidence
()
chapter1/context/test_grounding.py:30
Functiontest_small_two_model_sample
()
chapter7/elo-leaderboard/tests/test_bt_small_sample.py:7
Functiontest_sms_inbox_poll_preserves_empty_then_observed_result
()
chapter7/android-world/test_experiment.py:122
Functiontest_software_gate_record_preserves_live_acceptance_blockers
()
chapter10/autonomous-phone-registration/test_exp103_validation_evidence.py:22
Methodtest_sorted_by_modification_time
Test that results are sorted by modification time
chapter5/coding-agent/tests/test_glob_tool.py:49
Methodtest_sorted_output
Test that entries are sorted
chapter5/coding-agent/tests/test_ls_tool.py:109
Functiontest_source_clamps_context
()
chapter5/coding-agent/tests/test_grep_negative_context.py:5
Functiontest_source_contract_caps_total_bullets_per_page
()
chapter5/paper-to-ppt/test_page_contract.py:31
Functiontest_source_contract_counts_non_markdown_fake_bullets
()
chapter5/paper-to-ppt/test_page_contract.py:37
Functiontest_source_contract_enforces_dedicated_bounded_figure_page
()
chapter5/paper-to-ppt/test_page_contract.py:44
Functiontest_source_contract_requires_18_to_20_pages
()
chapter5/paper-to-ppt/test_page_contract.py:25
Functiontest_source_guards_empty_list
()
chapter8/Intuitor/tests/test_empty_text_list.py:19
Functiontest_source_guards_none_best
()
chapter3/structured-knowledge-extraction/test_archetypes_small_charge.py:30
Functiontest_source_path_for_page_strips_leading_slashes
Contract: Leading slashes in page URIs must be normalized to relative repository paths. If a page URI carries a leading slash (e.g. /book/chapter
tests/test_git_revision_dates.py:33
Functiontest_source_skips_nonpositive_factor
()
chapter5/video-edit/test_slowmo_factor_zero.py:5
Functiontest_source_tag_is_found_in_structured_request_without_json_escape_confusion
()
chapter2/prompt-injection/test_campaign.py:56
Functiontest_source_treats_negative_head_limit_as_unlimited
()
chapter5/coding-agent/tests/test_grep_negative_head_limit.py:5
Functiontest_source_uses_max_guard
()
chapter1/learning-from-experience/tests/test_rl_progress_small_episodes.py:13
Functiontest_sources_are_unique_across_all_splits
()
chapter8/exact-copy-sft/tests/test_copy_pipeline.py:26
Functiontest_special_character_cases_are_present
()
chapter8/exact-copy-sft/tests/test_copy_pipeline.py:39
Methodtest_special_params_must_match_type
Special params with correct types should work
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:687
Methodtest_special_stop_token_keeps_text_flushed_before_it
(self)
chapter2/attention_visualization/test_streaming.py:140
Methodtest_special_tokens_end_pending_bytes
(self)
chapter2/attention_visualization/test_token_labels.py:51
Functiontest_speech_output_requires_tts
(monkeypatch, tmp_path)
chapter6/end-to-end-speech/tests/test_speech_model.py:20
Functiontest_speech_source_has_no_mock_or_tone_fallback
()
chapter6/phone-agent/test_speech.py:15
Functiontest_spliced_arguments_can_be_valid_but_wrong
续写在拼接处多出一个空格,JSON 照样合法,参数却已经错了。
chapter5/provider-failover/tests/test_offline.py:190
Functiontest_splits_are_nonempty_and_structured
()
chapter8/exact-copy-sft/tests/test_copy_pipeline.py:6
Functiontest_splits_are_nonempty_and_structured
()
chapter8/curly-quote-sft/tests/test_curly_pipeline.py:6
Functiontest_spoken_player_number_parser
()
chapter10/voice-werewolf/test_live_human.py:54
Methodtest_sql_block_comment_before_single_line_comment
(self)
chapter9/harness-safety-gate/test_safety_policy_gate.py:60
Methodtest_sql_delete_comment_bypass_multi_line
(self)
chapter9/harness-safety-gate/test_safety_policy_gate.py:42
Methodtest_sql_delete_comment_bypass_single_line
(self)
chapter9/harness-safety-gate/test_safety_policy_gate.py:35
Methodtest_sql_delete_multi_statement_bypass
(self)
chapter9/harness-safety-gate/test_safety_policy_gate.py:28
Methodtest_sql_delete_with_where_is_low_risk
(self)
chapter9/harness-safety-gate/test_safety_policy_gate.py:23
Methodtest_sql_delete_without_where_is_high_risk
(self)
chapter9/harness-safety-gate/test_safety_policy_gate.py:17
Methodtest_sql_drop_table_is_high_risk
(self)
chapter9/harness-safety-gate/test_safety_policy_gate.py:49
Methodtest_sql_multi_statement_second_delete_no_where
(self)
chapter9/harness-safety-gate/test_safety_policy_gate.py:54
Methodtest_stable_hash_unchanged_through_pipeline
(self)
chapter9/harness-safety-gate/test_evolution.py:228
Functiontest_stable_sample_maps_out_of_scope_languages_to_other
()
chapter8/prompt-distillation/test_experiment_8_8.py:33
Functiontest_stage_contracts_are_distinct_and_tool_gated
()
chapter10/staged-system-prompt/test_official_evidence.py:8
Functiontest_staged_scratch_generation_collects_every_file_and_call
(tmp_path: Path)
chapter5/agent-creator/test_creator.py:97
Methodtest_stale_parent_for_result_fails
(self)
chapter6/astra-async-steering/test_judging.py:80
Methodtest_stale_parent_for_result_fails
(self)
chapter6/astra-async-steering/validation/runs/exp6-14-20260905-formal/source/test_judging.py:80
Methodtest_stalemate
Test stalemate detection.
chapter4/collaboration-tools/test_chess_tools.py:219
Functiontest_standalone_create_and_update_still_commit_and_queue_reactions
(store)
tests/test_ch5_pedo_atomic_delete.py:205
Functiontest_standalone_image_paragraph_becomes_a_captioned_figure
()
tests/test_mkdocs_figure_captions.py:51
Functiontest_standalone_validator_proves_raw_receipt_consistency
()
chapter10/autonomous-phone-registration/test_validate_acceptance.py:30
Functiontest_standard_tool_loop_keeps_assistant_call_and_tool_result
()
chapter5/agent-creator/reference_agent/tests/test_contract.py:36
Methodtest_start_already_started_session
Test calling .start() on a session that's already started.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_session_start.py:49
Methodtest_start_device_flow
Test starting device flow.
chapter9/browser-use-rpa/browser-use/tests/ci/test_sync_client_auth.py:117
Methodtest_static_agent_does_not_look_like_continual_learning
(self)
chapter9/self-evolution-eval/test_longitudinal.py:26
Methodtest_statistics_calculation
Test that statistics are calculated correctly
chapter5/coding-agent/tests/test_todo_write_tool.py:108
Functiontest_status_block_matches_manuscript
()
chapter2/attention_visualization/test_status_bar_experiment.py:24
Methodtest_status_for_active_recurring_timer_does_not_require_expiry
(self)
chapter4/collaboration-tools/test_timer_tools.py:97
Methodtest_stop_browser_session_not_found
Test stopping a browser session that doesn't exist.
chapter9/browser-use-rpa/browser-use/tests/ci/test_cloud_browser.py:205
Methodtest_stop_browser_success
Test successful cloud browser session stop.
chapter9/browser-use-rpa/browser-use/tests/ci/test_cloud_browser.py:164
Functiontest_stop_cloud_browser_session_function
Test the stop_cloud_browser_session convenience function.
chapter9/browser-use-rpa/browser-use/tests/ci/test_cloud_browser.py:307
Methodtest_stop_string_exit_keeps_text_before_the_stop_string
(self)
chapter2/attention_visualization/test_streaming.py:132
Functiontest_stops_after_max_iterations_when_model_never_stops_calling_tools
()
tests/test_ch2_ollama_native_nonstream_react_loop.py:114
Functiontest_store_is_resumable_and_ignores_duplicate_cell
(tmp_path: Path)
chapter7/model-benchmark/test_campaign.py:97
Functiontest_strategy_acceptance_requires_all_named_criteria_and_evidence
()
chapter10/voice-werewolf/test_live_human.py:143
Functiontest_strategy_audit_retains_invalid_schema_and_tries_next_backend
(monkeypatch)
chapter10/voice-werewolf/test_live_human.py:184
Functiontest_strategy_metrics_to_dict
()
tests/test_ch2_benchmark_compression.py:26
Functiontest_strategy_validation_fails_closed_for_non_object_provider_output
(malformed)
chapter10/voice-werewolf/test_live_human.py:177
Functiontest_stream_assembles_fragmented_parallel_tool_calls
()
chapter2/local_llm_serving/test_vllm_structured_streaming.py:34
Functiontest_stream_once_uses_reasoning_chunks_for_ttft
()
chapter2/local_llm_serving/test_benchmark.py:46
Functiontest_stream_reports_malformed_arguments_and_continues
()
chapter2/local_llm_serving/test_vllm_structured_streaming.py:84
Methodtest_streaming_accumulation_never_appends_replacement_char
Mirror the streaming loops in main.py/agent.py: append the newest label.
chapter2/attention_visualization/test_token_labels.py:128
← previousnext →12,401–12,500 of 13,003, ranked by callers