MCPcopy Create free account

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

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

Functiontest_save_trajectory_writes_json_with_metadata
(tmp_path, monkeypatch)
chapter2/attention_visualization/test_save_trajectory.py:35
Functiontest_saved_campaign_manifest_binds_report_cases_and_runner
()
chapter7/user-memory-policy-eval/test_runner.py:46
Functiontest_saved_evidence_excludes_credentials
(monkeypatch, tmp_path)
chapter1/learning-from-experience/test_experiment_8_2_evidence.py:66
Functiontest_scale_words_and_grouped_digits_are_the_same_amount
()
chapter1/context/test_grounding.py:25
Methodtest_scholars_mate
Test Scholar's Mate (4-move checkmate).
chapter4/collaboration-tools/test_chess_tools.py:384
Functiontest_score_prediction_none_supported_claims
()
tests/test_ch7_score_prediction_unhashable_claims.py:25
Functiontest_score_prediction_none_supported_claims
()
tests/test_ch6_score_prediction_unhashable_claims.py:25
Functiontest_score_prediction_unhashable_dict_claims
()
tests/test_ch7_score_prediction_unhashable_claims.py:12
Functiontest_score_prediction_unhashable_dict_claims
()
tests/test_ch6_score_prediction_unhashable_claims.py:12
Functiontest_score_text_batches_all_rules_in_one_judge_call
()
chapter9/ai-style-skill/test_pipeline.py:154
Functiontest_scratch_creation_preserves_nonempty_existing_output
(tmp_path: Path)
chapter5/agent-creator/test_creator.py:145
Functiontest_scratch_creation_recovers_only_empty_staging_directory
(tmp_path: Path)
chapter5/agent-creator/test_creator.py:122
Methodtest_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
Methodtest_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
Methodtest_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
Methodtest_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
Methodtest_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
Functiontest_screenshots_are_copied_and_history_is_rewritten
(tmp_path: Path)
chapter6/computer-use-open-model/tests/test_evidence.py:7
Functiontest_script_entry_point_reads_command_line_arguments
(tmp_path)
chapter1/web-search-agent/tests/test_main.py:87
Methodtest_scroll_actions
Test basic scroll action functionality.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_event_ScrollEvent.py:82
Methodtest_scroll_iframe_content
Test scrolling inside a same-origin iframe.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_event_ScrollEvent.py:294
Methodtest_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
Methodtest_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
Methodtest_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
Methodtest_search
(params: SearchGoogleAction, browser_session: BrowserSession)
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:489
Methodtest_search_and_analyze_method
Test Case 6: Using the search_and_analyze convenience method
chapter1/search-codegen/tests/manual/agent_cases.py:152
Methodtest_search_and_code
Test Case 4: Search and code generation
chapter1/search-codegen/tests/manual/agent_cases.py:106
Functiontest_search_arxiv_bounds_client_page_size
(monkeypatch)
chapter4/perception-tools/test_arxiv_request_bounds.py:18
Methodtest_search_by_cid
Test searching compound by CID.
chapter4/perception-tools/test_pubchem_tools.py:54
Methodtest_search_by_formula
Test searching compounds by molecular formula.
chapter4/perception-tools/test_pubchem_tools.py:75
Methodtest_search_by_name
Test searching compounds by name.
chapter4/perception-tools/test_pubchem_tools.py:26
Methodtest_search_by_smiles
Test searching compound by SMILES.
chapter4/perception-tools/test_pubchem_tools.py:96
Methodtest_search_files_json
Test searching for specific file type.
chapter4/execution-tools/test_filesystem_enhanced.py:200
Methodtest_search_files_nonrecursive
Test non-recursive search.
chapter4/execution-tools/test_filesystem_enhanced.py:187
Methodtest_search_files_pattern
Test searching files by pattern.
chapter4/execution-tools/test_filesystem_enhanced.py:169
Methodtest_search_google_action
Test the search_google action.
chapter9/browser-use-rpa/browser-use/tests/ci/test_tools.py:299
Functiontest_search_history_limit_negative_returns_empty_list
(tmp_path, monkeypatch)
chapter3/user-memory/test_search_history_limit_zero.py:33
Functiontest_search_history_limit_zero_returns_empty_list
(tmp_path, monkeypatch)
chapter3/user-memory/test_search_history_limit_zero.py:24
Methodtest_search_invalid_query
Test searching with invalid query.
chapter4/perception-tools/test_pubchem_tools.py:113
Functiontest_search_knowledge_base_negative_top_k
(tmp_path: Path)
chapter4/perception-tools/test_search_kb_negative_top_k.py:11
Functiontest_search_nonpositive_top_k_returns_empty
Non-positive result limits return before query encoding.
chapter3/structured-index/test_graphrag_search_top_k.py:136
Methodtest_search_not_found
Test searching for non-existent compound.
chapter4/perception-tools/test_pubchem_tools.py:128
Functiontest_search_null_name_or_description
()
chapter9/self-evolving-tools/test_search_null_fields.py:6
Functiontest_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
Methodtest_search_similar
Test searching similar compounds.
chapter4/perception-tools/test_pubchem_tools.py:246
Methodtest_search_similar_lower_threshold
Test searching similar compounds with lower threshold.
chapter4/perception-tools/test_pubchem_tools.py:275
Functiontest_search_uses_v3_filters_and_top_k
()
chapter3/mem0/test_agent_v3.py:39
Functiontest_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
Functiontest_search_web_num_results_negative_returns_no_results
()
chapter4/perception-tools/src/test_search_web_num_results_zero.py:59
Functiontest_search_web_num_results_zero_returns_no_results
()
chapter4/perception-tools/src/test_search_web_num_results_zero.py:48
Functiontest_search_x_posts_fails_closed_on_invalid_pagination
(monkeypatch)
chapter4/perception-tools/test_xquik_tools.py:167
Functiontest_search_x_posts_preserves_structured_provider_error
(monkeypatch)
chapter4/perception-tools/test_xquik_tools.py:141
Functiontest_search_x_posts_rejects_invalid_inputs
(monkeypatch, kwargs, message)
chapter4/perception-tools/test_xquik_tools.py:132
Functiontest_search_x_posts_requires_environment_credential
(monkeypatch)
chapter4/perception-tools/test_xquik_tools.py:109
Functiontest_search_x_posts_uses_bounded_read_contract
(monkeypatch)
chapter4/perception-tools/test_xquik_tools.py:61
Functiontest_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
Methodtest_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
Methodtest_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
Methodtest_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
Methodtest_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
Methodtest_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
Methodtest_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
Methodtest_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
Functiontest_selected_source_images_exist_and_are_distinct
()
chapter5/paper-to-video/test_campaign.py:28
Functiontest_semantic_router_empty_servers
()
tests/test_ch4_semantic_router_empty_servers.py:13
Functiontest_semantic_router_servers_with_only_stop_words
()
tests/test_ch4_semantic_router_empty_servers.py:27
Functiontest_semantic_router_stop_words_query
()
tests/test_ch4_semantic_router_stop_words_query.py:15
Functiontest_semantic_router_tool_only_query
()
tests/test_ch4_semantic_router_stop_words_query.py:39
Functiontest_semantic_router_tools_with_only_stop_words
()
tests/test_ch4_semantic_router_stop_words_query.py:52
Methodtest_send_event_authenticated
Test sending event when authenticated.
chapter9/browser-use-rpa/browser-use/tests/ci/test_sync_client_auth.py:327
Methodtest_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
Methodtest_sendgrid_readiness_requires_a_sender_identity
(self)
chapter4/collaboration-tools/test_run_experiment_4_5.py:62
Methodtest_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
Methodtest_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
Methodtest_sequential_application
Test that edits are applied sequentially
chapter5/coding-agent/tests/test_multi_edit_tool.py:48
Methodtest_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
Functiontest_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
Functiontest_sesame_collator_stacks_all_model_inputs
()
chapter8/speech-sft-experiment/test_experiment.py:37
Functiontest_sesame_tag_categories_are_explicit
()
chapter8/speech-sft-experiment/test_experiment.py:17
Functiontest_session_endpoint_rejects_non_sdp_without_creating_a_peer
()
chapter6/phone-agent/test_webrtc_app.py:32
Functiontest_sft_rows_expose_only_raw_text_to_student
()
chapter8/prompt-distillation/test_experiment_8_8.py:44
Functiontest_sha256_file
(tmp_path)
chapter6/end-to-end-speech/tests/test_speech_model.py:8
Functiontest_sha256_is_stable
(tmp_path)
chapter8/speech-sft-experiment/test_experiment.py:45
Functiontest_sha256_reads_binary
(tmp_path: Path)
chapter2/agent-skills-ppt/test_official_validation.py:28
Methodtest_shared_approval_deadline_rejects_an_expired_window
(self)
chapter4/collaboration-tools/test_run_experiment_4_5.py:242
Methodtest_shell_id_returned
Test that shell_id is included in response
chapter5/coding-agent/tests/test_kill_bash_tool.py:46
Methodtest_shell_id_tracking
Test that shell_id is returned
chapter5/coding-agent/tests/test_bash_tool.py:156
Functiontest_shim_falls_back_to_openrouter
(monkeypatch)
tests/test_providers.py:508
Functiontest_shim_falls_back_to_openrouter_default_model_when_model_is_none
(monkeypatch)
tests/test_providers.py:515
Functiontest_shim_prefers_primary_key
()
tests/test_providers.py:499
Functiontest_shim_raises_without_any_key
()
tests/test_providers.py:521
Functiontest_short_file_char_overflow_does_not_duplicate_lines
()
chapter4/execution-tools/test_truncate_tail_lines_zero.py:28
Functiontest_short_messages_skipped_without_index_error
(tmp_path, monkeypatch, capsys)
chapter8/cot-distillation/test_analyze_short_messages.py:10
Methodtest_signals_cover_all_three_sources
(self)
chapter9/harness-safety-gate/test_evolution.py:53
Functiontest_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
Functiontest_simple_password_still_redacted
()
chapter3/log-sanitization/tests/test_url_credential_colon_slash.py:19
Functiontest_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
Methodtest_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
Methodtest_simple_reasoning
Test basic reasoning.
chapter4/collaboration-tools/test_intelligence_tools.py:68
Functiontest_simulated_or_missing_process_receipt_cannot_pass
()
chapter6/async-agent/test_real_experiment.py:39
← previousnext →12,301–12,400 of 13,003, ranked by callers