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_fallback_search_normal_query_still_matches
()
chapter3/contextual-retrieval-for-user-memory/test_fallback_search_empty_query.py:45
Function
test_falls_back_to_openrouter_when_provider_key_missing
(monkeypatch)
tests/test_providers.py:404
Method
test_false_promise_has_evidence
(self)
chapter9/trajectory-verifier/test_verifier.py:16
Method
test_falsey_values_are_cached
(self)
chapter7/model-action-threshold/tasks/cache_contract/repo/tests/test_cache.py:26
Function
test_fetch_webpage_title_with_nested_elements
Ensure fetch_webpage extracts title text correctly when title tag has nested HTML elements.
chapter2/context-compression/test_web_tools_null_content.py:40
Function
test_ffprobe_duration_empty
(monkeypatch)
chapter5/paper-to-video/test_ffprobe_duration.py:13
Function
test_ffprobe_duration_na
(monkeypatch)
chapter5/paper-to-video/test_ffprobe_duration.py:7
Function
test_ffprobe_duration_normal
(monkeypatch)
chapter5/paper-to-video/test_ffprobe_duration.py:19
Function
test_fiber_ids_only_accept_real_succeeded_receipts
()
chapter1/web-search-agent/tests/test_experiment_1_2.py:19
Function
test_field_validation_handles_email_phone_date_and_page_pattern
()
chapter10/autonomous-phone-registration/test_orchestration.py:96
Function
test_field_visibility_boundaries
Test field visibility enforcement and leakage detection.
tests/test_ch5_pedo_live_security_eval.py:103
Function
test_field_visibility_leakage_detected
Regression test: verify sensitive field leakage is detected when query returns forbidden sensitive fields.
tests/test_ch5_pedo_live_security_eval.py:205
Method
test_file_content_operations
Test content update and append operations.
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:70
Method
test_file_creation
Test creating new file with MultiEdit (empty old_string in first edit)
chapter5/coding-agent/tests/test_multi_edit_tool.py:87
Method
test_file_disk_operations
Test file sync to disk operations.
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:92
Function
test_file_entry_missing_content_dropped
文件项有合法 path 但缺 content → 丢弃该项,避免下游写盘 f["content"] 抛出 KeyError 而中断整个 demo(与缺 path 抛白名单错误对称处理)。
chapter5/conversational-ui/test_customize_malformed_args.py:52
Function
test_file_entry_missing_path_rejected_cleanly
文件项缺 path → 清晰的白名单拒绝(RuntimeError),而非 KeyError。
chapter5/conversational-ui/test_customize_malformed_args.py:35
Method
test_file_input_click_prevention
Test that clicking a file input element raises an exception.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_event_ClickElementEvent.py:607
Method
test_file_not_found
Test error when file doesn't exist
chapter5/coding-agent/tests/test_edit_tool.py:128
Function
test_file_read_detected_low_risk
Read-only file access is detected and classified as low risk.
tests/test_ch5_sandbox_evaluator.py:76
Method
test_file_sizes
Test that file sizes are reported
chapter5/coding-agent/tests/test_ls_tool.py:128
Method
test_file_sync_to_disk_sync
Test synchronous disk sync operation.
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:171
Method
test_file_upload_click_and_verify
Test that clicking a file upload element and uploading a file works correctly.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_event_ClickElementEvent.py:1008
Method
test_file_upload_path_validation
Test that file upload validates paths correctly with available_file_paths, downloaded_files, and FileSystem.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_event_ClickElementEvent.py:1206
Function
test_file_write_detected_medium_risk
File writes are detected and classified as medium (persistent memory).
tests/test_ch5_sandbox_evaluator.py:83
Method
test_filename_parsing
Test filename parsing into name and extension.
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:268
Method
test_filename_validation
Test filename validation.
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:246
Function
test_files
Create test files for testing.
chapter4/execution-tools/test_filesystem_enhanced.py:26
Method
test_files_and_directories
Test that both files and directories are listed
chapter5/coding-agent/tests/test_ls_tool.py:31
Function
test_files_null_normalized_to_empty
files 为显式 null → 归一化为空列表,下游迭代不崩溃。
chapter5/conversational-ui/test_customize_malformed_args.py:27
Method
test_filesystem_initialization
Test FileSystem initialization with default files.
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:211
Method
test_filesystem_recreates_data_dir
Test that FileSystem recreates data directory if it exists.
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:798
Method
test_filesystem_with_path_object
Test FileSystem creation with Path object.
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:789
Method
test_filesystem_with_string_path
Test FileSystem creation with string path.
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:781
Method
test_filesystem_without_default_files
Test FileSystem initialization without default files.
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:228
Function
test_filter_data_normal_case_unchanged
Non-empty input still filters and reports normally.
chapter7/elo-leaderboard/tests/test_filter_empty.py:24
Function
test_filter_data_tolerates_empty_dataframe
Empty input no longer raises ZeroDivisionError; returns an empty DataFrame.
chapter7/elo-leaderboard/tests/test_filter_empty.py:17
Method
test_filter_parameter
Test optional regex filtering of output
chapter5/coding-agent/tests/test_bash_output_tool.py:41
Function
test_filter_sensitive_data
Test that _filter_sensitive_data handles all sensitive data scenarios correctly
chapter9/browser-use-rpa/browser-use/tests/ci/test_agent_sensitive_data.py:216
Method
test_final_true_still_flushes_truncated_sequence
(self)
chapter2/attention_visualization/test_token_labels.py:98
Method
test_financial_statement_invalid_type
Test getting financial statement with invalid type.
chapter4/perception-tools/test_yahoo_finance_tools.py:311
Function
test_find_bash_missing_returns_none
(monkeypatch)
chapter4/execution-tools/test_bash_lookup.py:40
Function
test_find_bash_posix_prefers_bin_bash
(monkeypatch)
chapter4/execution-tools/test_bash_lookup.py:24
Function
test_find_bash_windows_uses_bash_on_path
(monkeypatch)
chapter4/execution-tools/test_bash_lookup.py:31
Method
test_find_contradictions_directly
find_contradictions works standalone with (step_id, text) tuples.
tests/test_ch8_trajectory_consistency_checker.py:126
Method
test_find_contradictions_directly
find_contradictions works standalone with (step_id, text) tuples.
tests/test_ch9_trajectory_consistency_checker.py:126
Function
test_fingerprint_ignores_key_order
()
chapter5/provider-failover/tests/test_offline.py:122
Method
test_first_patch_and_rework_are_recorded
(self)
chapter7/model-action-threshold/tests/test_experiment.py:37
Function
test_fixed_abstention_has_real_audio_api_receipt
()
chapter10/voice-werewolf/test_exp106_validation_evidence.py:92
Function
test_fixture_dimensions_accurate
(flange_measurement)
chapter5/cad-vs-diffusion/test_offline.py:28
Function
test_fixture_flat_face
(flange_measurement)
chapter5/cad-vs-diffusion/test_offline.py:37
Function
test_flatten_nav_after_flatten_ncx_preserves_default_xhtml_namespace
Contract: flatten_nav must re-register the default XHTML namespace so that element serialization does not emit unwanted 'ns0:' namespace prefixes
tests/test_flatten_epub_toc.py:10
Function
test_flatten_nav_does_not_add_chapter_group_class_to_inserted_title_and_contents
Contract: flatten_nav must insert title-page and contents TOC items after iterating over chapter items, so that top-level non-chapter entries are
tests/test_flatten_epub_toc.py:46
Function
test_flatten_nav_inserted_top_level_nav_items_order_and_attributes
Contract: inserted top-level nav items (title-page, contents) are placed first in order and preserve XHTML element tag without chapter-group class
tests/test_flatten_epub_toc.py:92
Function
test_flatten_ncx_after_flatten_nav_preserves_default_ncx_namespace
Contract: flatten_ncx must output default NCX namespace without ns0: prefix even if flatten_nav ran first.
tests/test_flatten_epub_toc.py:66
Function
test_float32_bytes_energy_calculation
Verify float32 raw bytes energy calculation.
tests/test_ch6_interruption_manager.py:180
Function
test_float32_bytes_energy_calculation
Verify float32 raw bytes energy calculation.
tests/test_ch9_interruption_manager.py:180
Function
test_float_audio_above_unity_uses_fixed_scale
Regression: float arrays with values > 1.0 must use a fixed scale (32768), not chunk max, preserving relative volume.
tests/test_ch6_interruption_manager.py:277
Function
test_float_audio_above_unity_uses_fixed_scale
Regression: float arrays with values > 1.0 must use a fixed scale (32768), not chunk max, preserving relative volume.
tests/test_ch9_interruption_manager.py:277
Method
test_flow_step_title_marks_continuation
(self)
chapter2/attention_visualization/test_visualization.py:73
Function
test_formal_webrtc_acceptance_passes_every_gate_without_pstn
()
chapter10/autonomous-phone-registration/test_exp103_validation_evidence.py:56
Function
test_formal_webrtc_manifest_hashes_runtime_and_artifacts
()
chapter10/autonomous-phone-registration/test_exp103_validation_evidence.py:94
Function
test_format_chat_template_handles_non_list_messages
()
tests/test_ch8_multilingual_reasoning_sft.py:8
Function
test_format_chat_template_handles_non_list_messages
()
tests/test_ch7_multilingual_reasoning_sft.py:8
Function
test_format_error_empty_content_and_bad_role
()
tests/test_ch8_sft_data_auditor.py:99
Function
test_format_error_empty_content_and_bad_role
()
tests/test_ch7_sft_data_auditor.py:99
Function
test_format_error_missing_messages
()
tests/test_ch8_sft_data_auditor.py:91
Function
test_format_error_missing_messages
()
tests/test_ch7_sft_data_auditor.py:91
Function
test_format_error_non_string_content
()
tests/test_ch8_sft_data_auditor.py:110
Function
test_format_error_non_string_content
()
tests/test_ch7_sft_data_auditor.py:110
Function
test_format_error_role_alternation_break
()
tests/test_ch8_sft_data_auditor.py:122
Function
test_format_error_role_alternation_break
()
tests/test_ch7_sft_data_auditor.py:122
Function
test_format_memory_operations_includes_memory_id_when_content_present
()
chapter3/user-memory/test_format_memory_operations_memory_id.py:5
Function
test_format_pred_label_keeps_real_codes
()
chapter8/prompt-distillation/test_evaluate_none_pred_label.py:36
Function
test_format_pred_label_none_is_displayable
()
chapter8/prompt-distillation/test_evaluate_none_pred_label.py:26
Function
test_format_trace_step_formats_action_with_unicode_arguments
()
chapter1/web-search-agent/tests/test_agent.py:44
Function
test_format_trace_step_truncates_long_content
()
chapter1/web-search-agent/tests/test_agent.py:57
Function
test_formula_declaration_is_fetched_and_recorded
(monkeypatch)
chapter1/web-search-agent/tests/test_agent.py:91
Function
test_formula_fiber_forwards_raw_arguments_and_records_receipt
(monkeypatch)
chapter1/web-search-agent/tests/test_agent.py:117
Function
test_four_dimensions_compute_reward_and_normalize_grade
()
chapter3/user-memory-evaluation/test_structured_rubric.py:35
Function
test_frac_numeric_format_wrappers_evaluate
()
chapter8/Intuitor/tests/test_normalize_frac_formatting.py:18
Function
test_frac_one_half
()
chapter8/Intuitor/tests/test_normalize_frac.py:14
Function
test_frac_six_over_two
()
chapter8/Intuitor/tests/test_normalize_frac.py:6
Function
test_frac_text_units_evaluates
()
chapter8/Intuitor/tests/test_normalize_frac_formatting.py:12
Function
test_frac_thin_space_evaluates
()
chapter8/Intuitor/tests/test_normalize_frac_formatting.py:6
Function
test_fractional_tests_still_rejected
(tmp_path)
chapter7/public-health-reporting-eval/tests/test_excel_float_int.py:50
Function
test_from_records_keeps_real_values
Normal values pass through unchanged (no coercion side effects).
chapter7/agent-cost-analysis/tests/test_trace_offline.py:53
Function
test_from_records_keeps_zero_tool_ctx_tokens
Explicit 0 means known-zero tool context, not unknown (-1).
chapter7/agent-cost-analysis/tests/test_trace_offline.py:62
Function
test_from_records_tolerates_missing_fields
Minimal span dicts (only step/tool) still parse.
chapter7/agent-cost-analysis/tests/test_trace_offline.py:45
Function
test_from_records_tolerates_null_fields
Explicit JSON nulls in numeric fields are coerced, not int(None) TypeError.
chapter7/agent-cost-analysis/tests/test_trace_offline.py:32
Method
test_from_state
Test restoring filesystem from state.
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:558
Method
test_from_state_with_json_csv_files
Test restoring filesystem from state with JSON and CSV files.
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:697
Method
test_from_state_with_unknown_file_type
Test restoring state with unknown file types (should skip them).
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:830
Function
test_frozen_matrix_has_every_factorial_cell_once
()
chapter5/small-model-codified-rules/test_campaign.py:13
Function
test_frozen_protocol_has_three_common_cases_and_native_pricing
()
chapter5/agent-creator/test_creator.py:267
Method
test_full_auth_flow
Test complete authentication flow.
chapter9/browser-use-rpa/browser-use/tests/ci/test_sync_client_auth.py:680
Function
test_full_contract_uses_raw_followup_context
()
chapter1/context/test_experiment_1_1.py:32
Function
test_full_suite_gate_rejects_counters_without_direct_episodes
()
chapter7/android-world/test_experiment.py:254
Function
test_full_suite_gate_requires_direct_116_by_5_evidence
()
chapter7/android-world/test_experiment.py:185
Function
test_full_suite_gate_requires_reference_api_and_apps
()
chapter7/android-world/test_experiment.py:220
← previous
next →
11,001–11,100 of 13,003, ranked by callers