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_save_trajectory_writes_json_with_metadata
(tmp_path, monkeypatch)
chapter2/attention_visualization/test_save_trajectory.py:35
Function
test_saved_campaign_manifest_binds_report_cases_and_runner
()
chapter7/user-memory-policy-eval/test_runner.py:46
Function
test_saved_evidence_excludes_credentials
(monkeypatch, tmp_path)
chapter1/learning-from-experience/test_experiment_8_2_evidence.py:66
Function
test_scale_words_and_grouped_digits_are_the_same_amount
()
chapter1/context/test_grounding.py:25
Method
test_scholars_mate
Test Scholar's Mate (4-move checkmate).
chapter4/collaboration-tools/test_chess_tools.py:384
Function
test_score_prediction_none_supported_claims
()
tests/test_ch7_score_prediction_unhashable_claims.py:25
Function
test_score_prediction_none_supported_claims
()
tests/test_ch6_score_prediction_unhashable_claims.py:25
Function
test_score_prediction_unhashable_dict_claims
()
tests/test_ch7_score_prediction_unhashable_claims.py:12
Function
test_score_prediction_unhashable_dict_claims
()
tests/test_ch6_score_prediction_unhashable_claims.py:12
Function
test_score_text_batches_all_rules_in_one_judge_call
()
chapter9/ai-style-skill/test_pipeline.py:154
Function
test_scratch_creation_preserves_nonempty_existing_output
(tmp_path: Path)
chapter5/agent-creator/test_creator.py:145
Function
test_scratch_creation_recovers_only_empty_staging_directory
(tmp_path: Path)
chapter5/agent-creator/test_creator.py:122
Method
test_screenshot_at_bottom_of_page
Test screenshot capture when scrolled to bottom of page (regression test for clipping issue)
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_watchdog_screenshots.py:334
Method
test_screenshot_graceful_handling_in_headless
Test that screenshot handling works correctly in headless mode even with closed pages
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_watchdog_screenshots.py:123
Method
test_screenshot_response_event_dispatching
Test that ScreenshotResponseEvent is properly dispatched by event handlers.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_watchdog_screenshots.py:377
Method
test_screenshot_with_state_summary_in_headless
Test that get_state_summary includes screenshots in headless mode
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_watchdog_screenshots.py:84
Method
test_screenshot_works_in_headless_mode
Explicitly test that screenshots can be captured in headless=True mode
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_watchdog_screenshots.py:19
Function
test_screenshots_are_copied_and_history_is_rewritten
(tmp_path: Path)
chapter6/computer-use-open-model/tests/test_evidence.py:7
Function
test_script_entry_point_reads_command_line_arguments
(tmp_path)
chapter1/web-search-agent/tests/test_main.py:87
Method
test_scroll_actions
Test basic scroll action functionality.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_event_ScrollEvent.py:82
Method
test_scroll_iframe_content
Test scrolling inside a same-origin iframe.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_event_ScrollEvent.py:294
Method
test_scroll_non_scrollable_page
Test scrolling a page that's only 100px tall (not scrollable).
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_event_ScrollEvent.py:156
Method
test_scroll_very_long_page
Test scrolling a very long page (over 10,000px) by 8,000px.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_event_ScrollEvent.py:206
Method
test_scroll_with_cross_origin_disabled
Test that scroll works when cross_origin_iframes is disabled.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_event_ScrollEvent.py:138
Method
test_search
(params: SearchGoogleAction, browser_session: BrowserSession)
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:489
Method
test_search_and_analyze_method
Test Case 6: Using the search_and_analyze convenience method
chapter1/search-codegen/tests/manual/agent_cases.py:152
Method
test_search_and_code
Test Case 4: Search and code generation
chapter1/search-codegen/tests/manual/agent_cases.py:106
Function
test_search_arxiv_bounds_client_page_size
(monkeypatch)
chapter4/perception-tools/test_arxiv_request_bounds.py:18
Method
test_search_by_cid
Test searching compound by CID.
chapter4/perception-tools/test_pubchem_tools.py:54
Method
test_search_by_formula
Test searching compounds by molecular formula.
chapter4/perception-tools/test_pubchem_tools.py:75
Method
test_search_by_name
Test searching compounds by name.
chapter4/perception-tools/test_pubchem_tools.py:26
Method
test_search_by_smiles
Test searching compound by SMILES.
chapter4/perception-tools/test_pubchem_tools.py:96
Method
test_search_files_json
Test searching for specific file type.
chapter4/execution-tools/test_filesystem_enhanced.py:200
Method
test_search_files_nonrecursive
Test non-recursive search.
chapter4/execution-tools/test_filesystem_enhanced.py:187
Method
test_search_files_pattern
Test searching files by pattern.
chapter4/execution-tools/test_filesystem_enhanced.py:169
Method
test_search_google_action
Test the search_google action.
chapter9/browser-use-rpa/browser-use/tests/ci/test_tools.py:299
Function
test_search_history_limit_negative_returns_empty_list
(tmp_path, monkeypatch)
chapter3/user-memory/test_search_history_limit_zero.py:33
Function
test_search_history_limit_zero_returns_empty_list
(tmp_path, monkeypatch)
chapter3/user-memory/test_search_history_limit_zero.py:24
Method
test_search_invalid_query
Test searching with invalid query.
chapter4/perception-tools/test_pubchem_tools.py:113
Function
test_search_knowledge_base_negative_top_k
(tmp_path: Path)
chapter4/perception-tools/test_search_kb_negative_top_k.py:11
Function
test_search_nonpositive_top_k_returns_empty
Non-positive result limits return before query encoding.
chapter3/structured-index/test_graphrag_search_top_k.py:136
Method
test_search_not_found
Test searching for non-existent compound.
chapter4/perception-tools/test_pubchem_tools.py:128
Function
test_search_null_name_or_description
()
chapter9/self-evolving-tools/test_search_null_fields.py:6
Function
test_search_positive_top_k_returns_results
Positive result limits still run retrieval and cap the results.
chapter3/structured-index/test_graphrag_search_top_k.py:145
Method
test_search_similar
Test searching similar compounds.
chapter4/perception-tools/test_pubchem_tools.py:246
Method
test_search_similar_lower_threshold
Test searching similar compounds with lower threshold.
chapter4/perception-tools/test_pubchem_tools.py:275
Function
test_search_uses_v3_filters_and_top_k
()
chapter3/mem0/test_agent_v3.py:39
Function
test_search_web_handles_null_page_content
Ensure search_web calculates content_length correctly when page_content['content'] is None.
chapter2/context-compression/test_web_tools_null_content.py:17
Function
test_search_web_num_results_negative_returns_no_results
()
chapter4/perception-tools/src/test_search_web_num_results_zero.py:59
Function
test_search_web_num_results_zero_returns_no_results
()
chapter4/perception-tools/src/test_search_web_num_results_zero.py:48
Function
test_search_x_posts_fails_closed_on_invalid_pagination
(monkeypatch)
chapter4/perception-tools/test_xquik_tools.py:167
Function
test_search_x_posts_preserves_structured_provider_error
(monkeypatch)
chapter4/perception-tools/test_xquik_tools.py:141
Function
test_search_x_posts_rejects_invalid_inputs
(monkeypatch, kwargs, message)
chapter4/perception-tools/test_xquik_tools.py:132
Function
test_search_x_posts_requires_environment_credential
(monkeypatch)
chapter4/perception-tools/test_xquik_tools.py:109
Function
test_search_x_posts_uses_bounded_read_contract
(monkeypatch)
chapter4/perception-tools/test_xquik_tools.py:61
Function
test_second_aggregator_namespaces_models
A new aggregator must map bare model ids without touching resolution.py. Before ``namespaces_models`` existed this was gated on the literal provi
tests/test_providers.py:667
Method
test_select_aria_menu_option
Test select_dropdown_option with ARIA menu.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_event_GetDropdownOptionsEvent.py:534
Method
test_select_custom_dropdown_option
Test select_dropdown_option with custom dropdown.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_event_GetDropdownOptionsEvent.py:586
Method
test_select_dropdown_click_prevention
Test that clicking a select dropdown element raises an exception.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_event_ClickElementEvent.py:666
Method
test_select_dropdown_option
Test that select_dropdown_option correctly selects an option from a dropdown.
chapter9/browser-use-rpa/browser-use/tests/ci/test_tools.py:497
Method
test_select_dropdown_option_with_aria_menu
Test that select_dropdown_option can select an option from ARIA menus.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_event_GetDropdownOptionsEvent_aria_menus.py:219
Method
test_select_invalid_option_error
Test select_dropdown_option with non-existent option text.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_event_GetDropdownOptionsEvent.py:634
Method
test_select_native_dropdown_option
Test select_dropdown_option with native HTML select element.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_event_GetDropdownOptionsEvent.py:486
Function
test_selected_source_images_exist_and_are_distinct
()
chapter5/paper-to-video/test_campaign.py:28
Function
test_semantic_router_empty_servers
()
tests/test_ch4_semantic_router_empty_servers.py:13
Function
test_semantic_router_servers_with_only_stop_words
()
tests/test_ch4_semantic_router_empty_servers.py:27
Function
test_semantic_router_stop_words_query
()
tests/test_ch4_semantic_router_stop_words_query.py:15
Function
test_semantic_router_tool_only_query
()
tests/test_ch4_semantic_router_stop_words_query.py:39
Function
test_semantic_router_tools_with_only_stop_words
()
tests/test_ch4_semantic_router_stop_words_query.py:52
Method
test_send_event_authenticated
Test sending event when authenticated.
chapter9/browser-use-rpa/browser-use/tests/ci/test_sync_client_auth.py:327
Method
test_send_event_pre_auth
Test that non-session events are not sent when auth is not in progress.
chapter9/browser-use-rpa/browser-use/tests/ci/test_sync_client_auth.py:383
Method
test_sendgrid_readiness_requires_a_sender_identity
(self)
chapter4/collaboration-tools/test_run_experiment_4_5.py:62
Method
test_sequential_agents_same_profile_different_browser
Test Sequential Agents, Same Profile, Different Browser pattern
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_session_start.py:145
Method
test_sequential_agents_same_profile_same_browser
Test Sequential Agents, Same Profile, Same Browser pattern
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_session_start.py:182
Method
test_sequential_application
Test that edits are applied sequentially
chapter5/coding-agent/tests/test_multi_edit_tool.py:48
Method
test_server_downtime_resilience
Test that server downtime doesn't break the agent.
chapter9/browser-use-rpa/browser-use/tests/ci/test_sync_client_auth.py:894
Function
test_server_result_formatting_handles_null_lists
Ensure event response dictionary formats tool_calls_count and todo_items without TypeError when tool_calls or todo_list is None.
chapter6/agent-with-event-trigger/tests/test_server_null_result_lists.py:6
Function
test_sesame_collator_stacks_all_model_inputs
()
chapter8/speech-sft-experiment/test_experiment.py:37
Function
test_sesame_tag_categories_are_explicit
()
chapter8/speech-sft-experiment/test_experiment.py:17
Function
test_session_endpoint_rejects_non_sdp_without_creating_a_peer
()
chapter6/phone-agent/test_webrtc_app.py:32
Function
test_sft_rows_expose_only_raw_text_to_student
()
chapter8/prompt-distillation/test_experiment_8_8.py:44
Function
test_sha256_file
(tmp_path)
chapter6/end-to-end-speech/tests/test_speech_model.py:8
Function
test_sha256_is_stable
(tmp_path)
chapter8/speech-sft-experiment/test_experiment.py:45
Function
test_sha256_reads_binary
(tmp_path: Path)
chapter2/agent-skills-ppt/test_official_validation.py:28
Method
test_shared_approval_deadline_rejects_an_expired_window
(self)
chapter4/collaboration-tools/test_run_experiment_4_5.py:242
Method
test_shell_id_returned
Test that shell_id is included in response
chapter5/coding-agent/tests/test_kill_bash_tool.py:46
Method
test_shell_id_tracking
Test that shell_id is returned
chapter5/coding-agent/tests/test_bash_tool.py:156
Function
test_shim_falls_back_to_openrouter
(monkeypatch)
tests/test_providers.py:508
Function
test_shim_falls_back_to_openrouter_default_model_when_model_is_none
(monkeypatch)
tests/test_providers.py:515
Function
test_shim_prefers_primary_key
()
tests/test_providers.py:499
Function
test_shim_raises_without_any_key
()
tests/test_providers.py:521
Function
test_short_file_char_overflow_does_not_duplicate_lines
()
chapter4/execution-tools/test_truncate_tail_lines_zero.py:28
Function
test_short_messages_skipped_without_index_error
(tmp_path, monkeypatch, capsys)
chapter8/cot-distillation/test_analyze_short_messages.py:10
Method
test_signals_cover_all_three_sources
(self)
chapter9/harness-safety-gate/test_evolution.py:53
Function
test_simple_domain_specific_sensitive_data
Test the basic functionality of domain-specific sensitive data replacement
chapter9/browser-use-rpa/browser-use/tests/ci/test_agent_sensitive_data.py:73
Function
test_simple_password_still_redacted
()
chapter3/log-sanitization/tests/test_url_credential_colon_slash.py:19
Function
test_simple_playwright_download
Test basic Playwright download functionality without browser-use - this just validates the browser setup
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_watchdog_downloads_simple.py:9
Method
test_simple_prohibited_domains
Domain-only patterns block exact host and www, but not other subdomains.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_watchdog_security2.py:295
Method
test_simple_reasoning
Test basic reasoning.
chapter4/collaboration-tools/test_intelligence_tools.py:68
Function
test_simulated_or_missing_process_receipt_cannot_pass
()
chapter6/async-agent/test_real_experiment.py:39
← previous
next →
12,301–12,400 of 13,003, ranked by callers