MCPcopy Create free account

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

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

Methodtest_event_handlers_registration
Test that event handlers are properly registered.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_session_start.py:247
Methodtest_event_history_limits
Test that event history summary respects max_events parameter.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_session_recent_events.py:321
Methodtest_event_log_covers_every_formal_episode
(self)
chapter6/gemini-xlerobot-navigation/test_validator.py:16
Methodtest_event_system_error_handling
Test error handling in event system.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_session_start.py:302
Functiontest_event_trigger_readme_installs_chapter_and_mcp_server_extras
()
tests/test_chapter_numbering_consistency.py:137
Functiontest_event_trigger_readme_setup_directories_exist
()
tests/test_chapter_numbering_consistency.py:127
Functiontest_event_trigger_readme_uses_chapter_6_labels
()
tests/test_chapter_numbering_consistency.py:117
Functiontest_every_allowed_live_roster_has_one_human_and_five_to_seven_ai
(seat_count)
chapter10/voice-werewolf/test_live_human.py:36
Functiontest_every_figure_in_every_edition_carries_its_number_in_the_alt_text
()
tests/test_mkdocs_figure_captions.py:175
Functiontest_every_homepage_uses_current_manuscript_titles_and_valid_links
()
tests/test_homepage_index.py:13
Functiontest_every_promoted_chapter_resolves_to_a_real_source
()
tests/test_site_edit_urls.py:75
Functiontest_every_provider_has_key_vars_unless_local
()
tests/test_providers.py:529
Functiontest_every_requirement_has_category
()
chapter1/image-gen-workflow/tests/test_requirements.py:6
Functiontest_evidence_package_zero_and_none_sample_size_no_division_error
Finding #3: zero/None sample_size must not cause division by zero. Regression: the pre-fix guard ``sample_size <= 0`` raised TypeError on None.
tests/test_ch7_rate_ramp_benchmark.py:237
Functiontest_evidence_package_zero_and_none_sample_size_no_division_error
Finding #3: zero/None sample_size must not cause division by zero. Regression: the pre-fix guard ``sample_size <= 0`` raised TypeError on None.
tests/test_ch6_rate_ramp_benchmark.py:237
Functiontest_evidence_writer_serializes_numpy_scalars
(tmp_path)
chapter1/learning-from-experience/test_experiment_8_2_evidence.py:90
Methodtest_evolving_agent_transfers_updates_and_retains
(self)
chapter9/self-evolution-eval/test_longitudinal.py:13
Functiontest_exact_711_gate_requires_all_1440_real_priced_successes_and_readiness
()
chapter7/user-memory-system-evaluation/test_experiment.py:332
Functiontest_exact_acceptance_roster_has_one_human_and_required_roles
()
chapter10/voice-werewolf/test_live_human.py:25
Functiontest_exact_duplicates_found
()
tests/test_ch8_sft_data_auditor.py:164
Functiontest_exact_duplicates_found
()
tests/test_ch7_sft_data_auditor.py:164
Functiontest_excel_float_tests_field_loads_as_int
(tmp_path)
chapter7/public-health-reporting-eval/tests/test_excel_float_int.py:42
Methodtest_excessive_event_queue_handling
Test that excessive event queuing doesn't break the agent.
chapter9/browser-use-rpa/browser-use/tests/ci/test_sync_client_auth.py:925
Methodtest_excluded_actions
Test that excluded actions are not registered.
chapter9/browser-use-rpa/browser-use/tests/ci/test_tools.py:286
Methodtest_excluded_actions
Test that excluded actions are not registered
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:455
Functiontest_exec_detected_high_risk
exec() is arbitrary execution and classified as high risk.
tests/test_ch5_sandbox_evaluator.py:132
Functiontest_execute_captures_stdout
()
chapter4/execution-tools/test_multilang_output.py:25
Functiontest_execute_code_null_code_coerced_to_empty_string
()
chapter10/staged-system-prompt/tests/test_null_tool_args.py:32
Functiontest_execute_code_sees_workspace_files_and_future_import_smoke_test_passes
()
chapter10/staged-system-prompt/test_official_evidence.py:61
Methodtest_execute_command_ls
Test listing directory.
chapter4/execution-tools/test_terminal_controller.py:46
Methodtest_execute_command_simple
Test executing a simple command.
chapter4/execution-tools/test_terminal_controller.py:35
Methodtest_execute_javascript
Test that execute_javascript correctly executes JavaScript in the current page.
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry_action_parameter_injection.py:180
Functiontest_execute_python_normal_print
()
chapter10/multi-role-transfer/tests/test_execute_python_timeout.py:15
Functiontest_execute_python_timeout_on_infinite_loop
()
chapter10/multi-role-transfer/tests/test_execute_python_timeout.py:7
Functiontest_execute_research_survives_malformed_tool_arguments_json
()
chapter2/context-compression/test_malformed_tool_json.py:19
Functiontest_execute_research_survives_non_dict_and_invalid_bytes_tool_arguments
Non-dict JSON structures (lists, numbers) and invalid UTF-8 bytes must normalize to {} and not raise.
chapter2/context-compression/test_malformed_tool_json.py:64
Functiontest_execute_research_survives_tool_execution_exceptions
Tool execution exceptions in search_web or fetch_webpage must return error dicts with compressed=None and not abort loop.
chapter2/context-compression/test_malformed_tool_json.py:106
Functiontest_execute_task_does_not_complete_on_empty_terminal_content
()
chapter1/context/tests/test_malformed_tool_json.py:63
Functiontest_execute_task_survives_malformed_tool_arguments_json
()
chapter2/system-hint/test_malformed_tool_json.py:8
Functiontest_execute_task_survives_malformed_tool_arguments_json
()
chapter1/context/tests/test_malformed_tool_json.py:32
Methodtest_execute_uses_selected_windows_shell
(self)
chapter5/coding-agent/tests/test_shell_session.py:39
Methodtest_execute_when_cwd_contains_spaces
ShellSession must quote cwd so paths with spaces do not break cd.
chapter5/coding-agent/tests/test_shell_session.py:126
Functiontest_executes_tool_calls_requested_after_a_tool_result
()
tests/test_ch2_ollama_native_nonstream_react_loop.py:71
Functiontest_execution_completion_requires_full_exact_campaign
()
chapter5/small-model-codified-rules/test_campaign.py:62
Methodtest_existing_action_models
Test that existing action parameter models work correctly
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:485
Functiontest_existing_open_pull_request_is_reused
()
chapter4/execution-tools/test_github_idempotency.py:50
Functiontest_expanded_catalog_limit_null_option_handled
()
tests/test_ch4_expanded_catalog_limit_null.py:7
Functiontest_expanded_parameter_descriptions_are_tool_specific
()
chapter4/perception-tools/test_expanded_catalog.py:44
Functiontest_expected_match_uses_word_boundaries
()
chapter6/end-to-end-speech/tests/test_demo.py:6
Functiontest_expected_score
Test expected score calculation.
chapter7/elo-leaderboard/tests/test_elo.py:22
Functiontest_expensive_turn_absolute_threshold
()
tests/test_ch6_cost_efficiency_analyzer.py:247
Functiontest_expensive_turn_absolute_threshold
()
tests/test_ch7_cost_efficiency_analyzer.py:247
Functiontest_expensive_turn_relative_threshold
()
tests/test_ch6_cost_efficiency_analyzer.py:257
Functiontest_expensive_turn_relative_threshold
()
tests/test_ch7_cost_efficiency_analyzer.py:257
Functiontest_experiment_rejects_zero_episodes
(monkeypatch, capsys)
chapter1/learning-from-experience/tests/test_zero_episodes.py:39
Methodtest_expired_token_rejected
(self)
chapter9/harness-safety-gate/test_safety_policy_gate.py:189
Methodtest_expired_tokens_cleaned_on_issue
(self)
chapter9/harness-safety-gate/test_safety_policy_gate.py:200
Functiontest_explicit_action_variants_are_recorded_without_fallback
(monkeypatch)
chapter1/learning-from-experience/test_experiment_8_2_evidence.py:29
Functiontest_explicit_api_route_keeps_its_endpoint_and_model
(monkeypatch, provider, model)
tests/test_providers.py:193
Functiontest_explicit_base_url_wins_over_the_environment
(monkeypatch)
tests/test_ch1_learning_agent_kimi_base_url.py:68
Functiontest_explicit_cheaperinference_provider_is_not_hijacked_for_gpt5
(monkeypatch)
tests/test_providers.py:344
Functiontest_explicit_krill_provider_is_not_hijacked_for_gpt5
(monkeypatch)
tests/test_providers.py:373
Functiontest_explicit_model_overrides_default
(monkeypatch)
tests/test_providers.py:468
Functiontest_explicit_openai_provider_is_not_hijacked_for_gpt5
(monkeypatch)
tests/test_providers.py:421
Functiontest_explicit_openrouter_key_wins_over_env_for_gpt5
An explicit key for the openrouter provider is an OpenRouter credential, so it must not be silently replaced by OPENROUTER_API_KEY.
tests/test_providers.py:619
Functiontest_explicit_openrouter_key_works_without_env
(monkeypatch)
tests/test_providers.py:628
Functiontest_explicit_opper_keeps_gpt5_requests_on_its_endpoint
(monkeypatch)
tests/test_providers.py:275
Functiontest_explicit_pricing_overrides_embedded
()
tests/test_ch6_cost_efficiency_analyzer.py:114
Functiontest_explicit_pricing_overrides_embedded
()
tests/test_ch7_cost_efficiency_analyzer.py:114
Functiontest_explicit_rates_config_parsing
()
tests/test_ch7_rate_ramp_benchmark.py:139
Functiontest_explicit_rates_config_parsing
()
tests/test_ch6_rate_ramp_benchmark.py:139
Functiontest_explicit_uberllm_keeps_gpt5_requests_on_its_endpoint
(monkeypatch)
tests/test_providers.py:306
Methodtest_explicit_value_wins_over_environment
(self)
chapter7/model-action-threshold/tasks/localized_timeout/repo/tests/test_config.py:7
Functiontest_export_campaign_summary_returns_report_and_markdown
(tmp_path: Path)
chapter7/model-benchmark/test_campaign.py:415
Functiontest_extract_accepts_open_ended_rule_and_forces_llm_judge
(monkeypatch)
chapter9/ai-style-skill/test_pipeline.py:29
Methodtest_extract_and_translate
Test extracting and translating transcript.
chapter4/perception-tools/test_youtube_tools.py:187
Methodtest_extract_content_pattern_registration
Test that the extract_content pattern with mixed params registers correctly
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:841
Methodtest_extract_csv
Test CSV extraction.
chapter4/perception-tools/test_document_tools.py:148
Methodtest_extract_docx
Test DOCX extraction.
chapter4/perception-tools/test_document_tools.py:87
Functiontest_extract_gsm8k_multiple_hash_markers
()
chapter8/Intuitor/test_normalize_negative_currency.py:24
Methodtest_extract_image_to_text
Test image extraction to text
chapter4/multimodal-agent/test_multimodal.py:135
Functiontest_extract_keyframes_zero_num_frames_is_clamped
(tmp_path)
chapter4/perception-tools/test_video_keyframes_num_frames.py:46
Methodtest_extract_pdf_basic
Test basic PDF extraction.
chapter4/perception-tools/test_document_tools.py:26
Methodtest_extract_pdf_page_range
Test PDF extraction with page range.
chapter4/perception-tools/test_document_tools.py:57
Methodtest_extract_pdf_to_text
Test PDF extraction to text
chapter4/multimodal-agent/test_multimodal.py:114
Methodtest_extract_pptx
Test PPTX extraction.
chapter4/perception-tools/test_document_tools.py:118
Functiontest_extract_rejects_hallucinated_sources_and_examples
(monkeypatch)
chapter9/ai-style-skill/test_pipeline.py:64
Methodtest_extract_transcript_by_id
Test extracting transcript by video ID.
chapter4/perception-tools/test_youtube_tools.py:29
Methodtest_extract_transcript_by_url
Test extracting transcript by video URL.
chapter4/perception-tools/test_youtube_tools.py:55
Methodtest_extract_transcript_full_text
Test that full text is provided.
chapter4/perception-tools/test_youtube_tools.py:121
Methodtest_extract_transcript_invalid_video
Test extracting transcript from invalid video ID.
chapter4/perception-tools/test_youtube_tools.py:146
Methodtest_extract_transcript_metadata
Test that proper metadata is included.
chapter4/perception-tools/test_youtube_tools.py:160
Methodtest_extract_transcript_short_url
Test extracting transcript by short URL.
chapter4/perception-tools/test_youtube_tools.py:75
Methodtest_extract_transcript_with_timestamps
Test that transcript includes timestamps.
chapter4/perception-tools/test_youtube_tools.py:94
Functiontest_failed_call_is_not_factual_evidence
()
tests/test_ch9_factual_grounding.py:102
Functiontest_failed_compressed_receipts_are_not_canonical
(tmp_path)
chapter10/generative-agents/tests/test_validate_campaign.py:37
Functiontest_failed_delete_preserves_entire_graph_and_queues_nothing
(store, failure)
tests/test_ch5_pedo_atomic_delete.py:130
Functiontest_failed_run_without_image_is_accepted
()
chapter1/image-gen-workflow/tests/test_manifest_schema.py:93
Functiontest_fallback_key_is_not_reusable_as_a_provider_key
A resolved fallback backend carries the OpenRouter key, not the provider's own. Callers that re-resolve must pass an empty key instead, or an
tests/test_providers.py:554
Functiontest_fallback_search_empty_query_and_empty_chunk_text
()
chapter3/contextual-retrieval-for-user-memory/test_fallback_search_empty_query.py:39
← previousnext →10,901–11,000 of 13,003, ranked by callers