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
Method
test_event_handlers_registration
Test that event handlers are properly registered.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_session_start.py:247
Method
test_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
Method
test_event_log_covers_every_formal_episode
(self)
chapter6/gemini-xlerobot-navigation/test_validator.py:16
Method
test_event_system_error_handling
Test error handling in event system.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_session_start.py:302
Function
test_event_trigger_readme_installs_chapter_and_mcp_server_extras
()
tests/test_chapter_numbering_consistency.py:137
Function
test_event_trigger_readme_setup_directories_exist
()
tests/test_chapter_numbering_consistency.py:127
Function
test_event_trigger_readme_uses_chapter_6_labels
()
tests/test_chapter_numbering_consistency.py:117
Function
test_every_allowed_live_roster_has_one_human_and_five_to_seven_ai
(seat_count)
chapter10/voice-werewolf/test_live_human.py:36
Function
test_every_figure_in_every_edition_carries_its_number_in_the_alt_text
()
tests/test_mkdocs_figure_captions.py:175
Function
test_every_homepage_uses_current_manuscript_titles_and_valid_links
()
tests/test_homepage_index.py:13
Function
test_every_promoted_chapter_resolves_to_a_real_source
()
tests/test_site_edit_urls.py:75
Function
test_every_provider_has_key_vars_unless_local
()
tests/test_providers.py:529
Function
test_every_requirement_has_category
()
chapter1/image-gen-workflow/tests/test_requirements.py:6
Function
test_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
Function
test_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
Function
test_evidence_writer_serializes_numpy_scalars
(tmp_path)
chapter1/learning-from-experience/test_experiment_8_2_evidence.py:90
Method
test_evolving_agent_transfers_updates_and_retains
(self)
chapter9/self-evolution-eval/test_longitudinal.py:13
Function
test_exact_711_gate_requires_all_1440_real_priced_successes_and_readiness
()
chapter7/user-memory-system-evaluation/test_experiment.py:332
Function
test_exact_acceptance_roster_has_one_human_and_required_roles
()
chapter10/voice-werewolf/test_live_human.py:25
Function
test_exact_duplicates_found
()
tests/test_ch8_sft_data_auditor.py:164
Function
test_exact_duplicates_found
()
tests/test_ch7_sft_data_auditor.py:164
Function
test_excel_float_tests_field_loads_as_int
(tmp_path)
chapter7/public-health-reporting-eval/tests/test_excel_float_int.py:42
Method
test_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
Method
test_excluded_actions
Test that excluded actions are not registered.
chapter9/browser-use-rpa/browser-use/tests/ci/test_tools.py:286
Method
test_excluded_actions
Test that excluded actions are not registered
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:455
Function
test_exec_detected_high_risk
exec() is arbitrary execution and classified as high risk.
tests/test_ch5_sandbox_evaluator.py:132
Function
test_execute_captures_stdout
()
chapter4/execution-tools/test_multilang_output.py:25
Function
test_execute_code_null_code_coerced_to_empty_string
()
chapter10/staged-system-prompt/tests/test_null_tool_args.py:32
Function
test_execute_code_sees_workspace_files_and_future_import_smoke_test_passes
()
chapter10/staged-system-prompt/test_official_evidence.py:61
Method
test_execute_command_ls
Test listing directory.
chapter4/execution-tools/test_terminal_controller.py:46
Method
test_execute_command_simple
Test executing a simple command.
chapter4/execution-tools/test_terminal_controller.py:35
Method
test_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
Function
test_execute_python_normal_print
()
chapter10/multi-role-transfer/tests/test_execute_python_timeout.py:15
Function
test_execute_python_timeout_on_infinite_loop
()
chapter10/multi-role-transfer/tests/test_execute_python_timeout.py:7
Function
test_execute_research_survives_malformed_tool_arguments_json
()
chapter2/context-compression/test_malformed_tool_json.py:19
Function
test_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
Function
test_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
Function
test_execute_task_does_not_complete_on_empty_terminal_content
()
chapter1/context/tests/test_malformed_tool_json.py:63
Function
test_execute_task_survives_malformed_tool_arguments_json
()
chapter2/system-hint/test_malformed_tool_json.py:8
Function
test_execute_task_survives_malformed_tool_arguments_json
()
chapter1/context/tests/test_malformed_tool_json.py:32
Method
test_execute_uses_selected_windows_shell
(self)
chapter5/coding-agent/tests/test_shell_session.py:39
Method
test_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
Function
test_executes_tool_calls_requested_after_a_tool_result
()
tests/test_ch2_ollama_native_nonstream_react_loop.py:71
Function
test_execution_completion_requires_full_exact_campaign
()
chapter5/small-model-codified-rules/test_campaign.py:62
Method
test_existing_action_models
Test that existing action parameter models work correctly
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:485
Function
test_existing_open_pull_request_is_reused
()
chapter4/execution-tools/test_github_idempotency.py:50
Function
test_expanded_catalog_limit_null_option_handled
()
tests/test_ch4_expanded_catalog_limit_null.py:7
Function
test_expanded_parameter_descriptions_are_tool_specific
()
chapter4/perception-tools/test_expanded_catalog.py:44
Function
test_expected_match_uses_word_boundaries
()
chapter6/end-to-end-speech/tests/test_demo.py:6
Function
test_expected_score
Test expected score calculation.
chapter7/elo-leaderboard/tests/test_elo.py:22
Function
test_expensive_turn_absolute_threshold
()
tests/test_ch6_cost_efficiency_analyzer.py:247
Function
test_expensive_turn_absolute_threshold
()
tests/test_ch7_cost_efficiency_analyzer.py:247
Function
test_expensive_turn_relative_threshold
()
tests/test_ch6_cost_efficiency_analyzer.py:257
Function
test_expensive_turn_relative_threshold
()
tests/test_ch7_cost_efficiency_analyzer.py:257
Function
test_experiment_rejects_zero_episodes
(monkeypatch, capsys)
chapter1/learning-from-experience/tests/test_zero_episodes.py:39
Method
test_expired_token_rejected
(self)
chapter9/harness-safety-gate/test_safety_policy_gate.py:189
Method
test_expired_tokens_cleaned_on_issue
(self)
chapter9/harness-safety-gate/test_safety_policy_gate.py:200
Function
test_explicit_action_variants_are_recorded_without_fallback
(monkeypatch)
chapter1/learning-from-experience/test_experiment_8_2_evidence.py:29
Function
test_explicit_api_route_keeps_its_endpoint_and_model
(monkeypatch, provider, model)
tests/test_providers.py:193
Function
test_explicit_base_url_wins_over_the_environment
(monkeypatch)
tests/test_ch1_learning_agent_kimi_base_url.py:68
Function
test_explicit_cheaperinference_provider_is_not_hijacked_for_gpt5
(monkeypatch)
tests/test_providers.py:344
Function
test_explicit_krill_provider_is_not_hijacked_for_gpt5
(monkeypatch)
tests/test_providers.py:373
Function
test_explicit_model_overrides_default
(monkeypatch)
tests/test_providers.py:468
Function
test_explicit_openai_provider_is_not_hijacked_for_gpt5
(monkeypatch)
tests/test_providers.py:421
Function
test_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
Function
test_explicit_openrouter_key_works_without_env
(monkeypatch)
tests/test_providers.py:628
Function
test_explicit_opper_keeps_gpt5_requests_on_its_endpoint
(monkeypatch)
tests/test_providers.py:275
Function
test_explicit_pricing_overrides_embedded
()
tests/test_ch6_cost_efficiency_analyzer.py:114
Function
test_explicit_pricing_overrides_embedded
()
tests/test_ch7_cost_efficiency_analyzer.py:114
Function
test_explicit_rates_config_parsing
()
tests/test_ch7_rate_ramp_benchmark.py:139
Function
test_explicit_rates_config_parsing
()
tests/test_ch6_rate_ramp_benchmark.py:139
Function
test_explicit_uberllm_keeps_gpt5_requests_on_its_endpoint
(monkeypatch)
tests/test_providers.py:306
Method
test_explicit_value_wins_over_environment
(self)
chapter7/model-action-threshold/tasks/localized_timeout/repo/tests/test_config.py:7
Function
test_export_campaign_summary_returns_report_and_markdown
(tmp_path: Path)
chapter7/model-benchmark/test_campaign.py:415
Function
test_extract_accepts_open_ended_rule_and_forces_llm_judge
(monkeypatch)
chapter9/ai-style-skill/test_pipeline.py:29
Method
test_extract_and_translate
Test extracting and translating transcript.
chapter4/perception-tools/test_youtube_tools.py:187
Method
test_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
Method
test_extract_csv
Test CSV extraction.
chapter4/perception-tools/test_document_tools.py:148
Method
test_extract_docx
Test DOCX extraction.
chapter4/perception-tools/test_document_tools.py:87
Function
test_extract_gsm8k_multiple_hash_markers
()
chapter8/Intuitor/test_normalize_negative_currency.py:24
Method
test_extract_image_to_text
Test image extraction to text
chapter4/multimodal-agent/test_multimodal.py:135
Function
test_extract_keyframes_zero_num_frames_is_clamped
(tmp_path)
chapter4/perception-tools/test_video_keyframes_num_frames.py:46
Method
test_extract_pdf_basic
Test basic PDF extraction.
chapter4/perception-tools/test_document_tools.py:26
Method
test_extract_pdf_page_range
Test PDF extraction with page range.
chapter4/perception-tools/test_document_tools.py:57
Method
test_extract_pdf_to_text
Test PDF extraction to text
chapter4/multimodal-agent/test_multimodal.py:114
Method
test_extract_pptx
Test PPTX extraction.
chapter4/perception-tools/test_document_tools.py:118
Function
test_extract_rejects_hallucinated_sources_and_examples
(monkeypatch)
chapter9/ai-style-skill/test_pipeline.py:64
Method
test_extract_transcript_by_id
Test extracting transcript by video ID.
chapter4/perception-tools/test_youtube_tools.py:29
Method
test_extract_transcript_by_url
Test extracting transcript by video URL.
chapter4/perception-tools/test_youtube_tools.py:55
Method
test_extract_transcript_full_text
Test that full text is provided.
chapter4/perception-tools/test_youtube_tools.py:121
Method
test_extract_transcript_invalid_video
Test extracting transcript from invalid video ID.
chapter4/perception-tools/test_youtube_tools.py:146
Method
test_extract_transcript_metadata
Test that proper metadata is included.
chapter4/perception-tools/test_youtube_tools.py:160
Method
test_extract_transcript_short_url
Test extracting transcript by short URL.
chapter4/perception-tools/test_youtube_tools.py:75
Method
test_extract_transcript_with_timestamps
Test that transcript includes timestamps.
chapter4/perception-tools/test_youtube_tools.py:94
Function
test_failed_call_is_not_factual_evidence
()
tests/test_ch9_factual_grounding.py:102
Function
test_failed_compressed_receipts_are_not_canonical
(tmp_path)
chapter10/generative-agents/tests/test_validate_campaign.py:37
Function
test_failed_delete_preserves_entire_graph_and_queues_nothing
(store, failure)
tests/test_ch5_pedo_atomic_delete.py:130
Function
test_failed_run_without_image_is_accepted
()
chapter1/image-gen-workflow/tests/test_manifest_schema.py:93
Function
test_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
Function
test_fallback_search_empty_query_and_empty_chunk_text
()
chapter3/contextual-retrieval-for-user-memory/test_fallback_search_empty_query.py:39
← previous
next →
10,901–11,000 of 13,003, ranked by callers