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_assignee_must_be_member
(pm_store, project_admin, member)
chapter5/permission-embedded-data-objects/tests/test_scenarios.py:250
Function
test_assistant_text_handles_null_content
Contract: _assistant_text does not output literal 'None' for assistant tool-call messages with content: None.
tests/test_ch9_assistant_text_null_content.py:10
Function
test_assistant_text_handles_null_content
Contract: _assistant_text does not output literal 'None' for assistant tool-call messages with content: None.
tests/test_ch8_assistant_text_null_content.py:10
Function
test_assumption_1_dom_processing_works
Test assumption 1: DOM processing works and finds elements.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_session_element_cache.py:81
Function
test_assumption_2_cached_selector_map_persists
Test assumption 2: Cached selector map persists after get_state_summary.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_session_element_cache.py:102
Function
test_assumption_3_action_gets_same_selector_map
Test assumption 3: Action gets the same selector map as cached.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_session_element_cache.py:129
Function
test_assumption_4_click_action_specific_issue
Test assumption 4: Specific issue with click_element_by_index action.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_session_element_cache.py:167
Function
test_assumption_5_multiple_get_selector_map_calls
Test assumption 5: Multiple calls to get_selector_map return consistent results.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_session_element_cache.py:217
Function
test_async_function_quality_scoring
Regression test: async functions are recognized for docstrings and type annotations.
tests/test_ch9_hermes_downstream_ablation.py:192
Function
test_async_function_quality_scoring
Regression test: async functions are recognized for docstrings and type annotations.
tests/test_ch8_hermes_downstream_ablation.py:192
Function
test_atlascloud_base_url_override
(monkeypatch)
tests/test_providers.py:232
Function
test_atlascloud_key_uses_multi_model_gateway_directly
(monkeypatch)
tests/test_providers.py:217
Function
test_atlascloud_namespaces_bare_model_ids
(monkeypatch)
tests/test_providers.py:227
Method
test_atomic_create_no_orphan_on_later_failure
Create-new-file must not leave an empty file if a later edit fails.
chapter5/coding-agent/tests/test_multi_edit_tool.py:107
Method
test_atomic_edits
Test that if any edit fails, none are applied
chapter5/coding-agent/tests/test_multi_edit_tool.py:66
Function
test_audit_empty_markdown_documents
()
tests/test_ch10_consistency_auditor_empty_inputs.py:19
Function
test_audit_empty_source_with_non_empty_target
()
tests/test_ch10_consistency_auditor_empty_inputs.py:34
Method
test_auth_credentials_do_not_cause_false_block
Credentials injection with prohibited domain in username should not block unrelated hosts.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_watchdog_security2.py:402
Method
test_auth_failure_resilience
Test that auth failures don't break the agent.
chapter9/browser-use-rpa/browser-use/tests/ci/test_sync_client_auth.py:853
Method
test_authenticate_then_send
Test that events are only sent after authentication.
chapter9/browser-use-rpa/browser-use/tests/ci/test_sync_client_auth.py:512
Method
test_authentication_bypass_prevention
Test that the URL allowlist cannot be bypassed using authentication credentials.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_watchdog_security2.py:7
Function
test_authorization_basic_case_insensitive
()
chapter3/log-sanitization/tests/test_authorization_basic.py:13
Function
test_authorization_basic_redacted
()
chapter3/log-sanitization/tests/test_authorization_basic.py:5
Method
test_auto_recursive_prefix
Test that patterns without **/ are auto-prefixed
chapter5/coding-agent/tests/test_glob_tool.py:37
Method
test_automatic_www_subdomain_addition
Test that root domains automatically allow www subdomain.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_watchdog_security2.py:138
Function
test_availability_groups_failures_and_computes_mttr
()
chapter7/model-benchmark/test_campaign.py:158
Function
test_backend_unpacks_like_the_old_tuple
(monkeypatch)
tests/test_providers.py:489
Method
test_background_execution
Test run_in_background parameter
chapter5/coding-agent/tests/test_bash_tool.py:106
Method
test_background_job_inherits_persistent_environment
Background Bash jobs retain variables exported earlier in the session.
chapter5/coding-agent/tests/test_bash_output_tool.py:98
Function
test_backoff_averages_exclude_non_throttled_requests
Findings #2/#4/#6: only 429 (throttled) requests contribute to backoff averages. Regression: the pre-fix code averaged every record with backoff_
tests/test_ch7_rate_ramp_benchmark.py:158
Function
test_backoff_averages_exclude_non_throttled_requests
Findings #2/#4/#6: only 429 (throttled) requests contribute to backoff averages. Regression: the pre-fix code averaged every record with backoff_
tests/test_ch6_rate_ramp_benchmark.py:158
Function
test_backoff_curves_with_non_dict_and_zero_backoff_429
()
tests/test_ch7_rate_ramp_benchmark.py:145
Function
test_backoff_curves_with_non_dict_and_zero_backoff_429
()
tests/test_ch6_rate_ramp_benchmark.py:145
Function
test_bad_cases_category_balance
()
chapter8/premature-completion-dpo/test_pipeline.py:59
Function
test_bad_cases_structure
()
chapter8/premature-completion-dpo/test_pipeline.py:45
Method
test_bad_fix_is_retained_with_concrete_rejection_reason
(self)
chapter9/self-modifying-agent/test_evolution.py:54
Function
test_bad_route_value
()
chapter1/image-gen-workflow/tests/test_manifest_schema.py:76
Function
test_baggage_policy_business_cabin
()
chapter9/prompt-auto-optimization/tests/test_baggage_policy_null.py:20
Function
test_baggage_policy_missing_cabin
()
chapter9/prompt-auto-optimization/tests/test_baggage_policy_null.py:14
Function
test_baggage_policy_null_cabin
()
chapter9/prompt-auto-optimization/tests/test_baggage_policy_null.py:6
Function
test_bare_object_type_stays_empty_properties
()
chapter9/self-evolving-tools/test_normalize_schema_bare_object.py:6
Function
test_barge_in_cancels_playback_and_transcribes_without_real_audio
(monkeypatch, tmp_path)
chapter10/voice-werewolf/test_live_human.py:237
Function
test_barge_in_when_not_playing_preserves_queued_audio
Regression: barge-in while not playing must not drop queued pending audio.
tests/test_ch6_interruption_manager.py:292
Function
test_barge_in_when_not_playing_preserves_queued_audio
Regression: barge-in while not playing must not drop queued pending audio.
tests/test_ch9_interruption_manager.py:292
Function
test_base_trajectory_has_three_calls_and_four_distractors
()
chapter2/attention_visualization/test_status_bar_experiment.py:16
Function
test_base_url_override
(monkeypatch)
tests/test_providers.py:463
Function
test_bash_roundtrip_with_real_bash
()
chapter4/execution-tools/test_bash_lookup.py:70
Method
test_basic_command
Test basic command execution
chapter5/coding-agent/tests/test_bash_tool.py:15
Method
test_basic_command_and_exit_code
Normal commands still work and report exit codes
chapter5/coding-agent/tests/test_shell_session.py:93
Method
test_basic_edit
Test basic search and replace
chapter5/coding-agent/tests/test_edit_tool.py:14
Function
test_basic_functionality
Pytest contract: failures are assertions, not a returned status value.
chapter3/contextual-retrieval/test_simple.py:129
Function
test_basic_functionality
Pytest contract: surface helper failure as an assertion.
chapter3/agentic-rag/test_simple.py:129
Method
test_basic_glob
Test basic glob pattern
chapter5/coding-agent/tests/test_glob_tool.py:13
Method
test_basic_listing
Test basic directory listing
chapter5/coding-agent/tests/test_ls_tool.py:14
Method
test_basic_plan_submission
Test submitting a plan
chapter5/coding-agent/tests/test_exit_plan_mode_tool.py:13
Method
test_basic_read
Test basic file reading
chapter5/coding-agent/tests/test_read_tool.py:15
Function
test_basic_screenshots
Navigate to a local page and ensure screenshot helpers return bytes.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_session_take_screenshot.py:17
Method
test_basic_search
Test basic pattern search
chapter5/coding-agent/tests/test_grep_tool.py:13
Method
test_basic_write
Test basic file writing
chapter5/coding-agent/tests/test_write_tool.py:14
Function
test_batch_counts_accumulate_across_resumed_invocations
(tmp_path: Path)
chapter7/model-benchmark/test_campaign.py:134
Function
test_batch_search_marks_all_failure_fallbacks_as_error
search_and_answer never raises; every failure fallback prefix must map to status='error', not just the '搜索过程中出现错误' one.
chapter1/web-search-agent/tests/test_examples.py:29
Function
test_bearer_still_redacted
()
chapter3/log-sanitization/tests/test_authorization_basic.py:20
Function
test_behavior_classifier_distinguishes_call_and_refusal
()
chapter2/attention_visualization/test_status_bar_experiment.py:30
Function
test_behavior_flags_cover_acceptance_categories
()
chapter8/cot-distillation/test_student_pipeline.py:34
Method
test_behavior_metrics_are_evaluated_in_sandbox
(self)
chapter9/self-modifying-agent/test_evolution.py:36
Method
test_below_threshold_cluster_is_ignored
(self)
chapter9/harness-safety-gate/test_evolution.py:43
Function
test_benchmark_extrapolation_zero_sample
Ensure empty df_sample does not raise ZeroDivisionError during extrapolation check.
chapter7/elo-leaderboard/tests/test_benchmark_zero_div.py:16
Function
test_benchmark_pct_reduction_zero_division
Ensure zero time_basic does not raise ZeroDivisionError during benchmark calculation.
chapter7/elo-leaderboard/tests/test_benchmark_zero_div.py:6
Function
test_best_none_skip_logic
()
chapter3/structured-knowledge-extraction/test_archetypes_small_charge.py:14
Function
test_best_stage_combination_is_highest_ndcg_prefix
()
tests/test_ch3_retrieval_stage_evaluator.py:309
Function
test_best_stage_combination_prefers_shorter_on_tie
When a late stage adds nothing, the cheaper prefix wins.
tests/test_ch3_retrieval_stage_evaluator.py:317
Function
test_bilingual_consistency_auditor_canonical_not_suppressed_by_longer_variant
Regression: canonical term must not be suppressed by a longer variant that contains it, causing false 'non-canonical' flagging. Old code sorte
tests/test_ch10_bilingual_consistency_auditor.py:266
Function
test_bilingual_consistency_auditor_case_insensitive_target_matching
Test that capital letters in target text (e.g. sentence start) match terms case-insensitively.
tests/test_ch10_bilingual_consistency_auditor.py:189
Function
test_bilingual_consistency_auditor_code_block_mismatch
Test auditing code block synchronization errors.
tests/test_ch10_bilingual_consistency_auditor.py:73
Function
test_bilingual_consistency_auditor_currency_dollar_not_formula_error
Regression: dollar signs in prose (e.g. 'costs $5') must not be misjudged as unbalanced LaTeX formula delimiters. Old code counted all '$' in
tests/test_ch10_bilingual_consistency_auditor.py:253
Function
test_bilingual_consistency_auditor_custom_glossary
Test auditing with a custom terminology glossary.
tests/test_ch10_bilingual_consistency_auditor.py:139
Function
test_bilingual_consistency_auditor_fenced_code_block_dollar_signs_ignored_in_latex_audit
Test that dollar signs in fenced code blocks are stripped before checking LaTeX formula balance.
tests/test_ch10_bilingual_consistency_auditor.py:232
Function
test_bilingual_consistency_auditor_file_path_inputs
Test auditing with actual file path inputs on disk.
tests/test_ch10_bilingual_consistency_auditor.py:124
Function
test_bilingual_consistency_auditor_independent_substring_variants
Test that independent usage of canonical term alongside longer variant triggers warning.
tests/test_ch10_bilingual_consistency_auditor.py:179
Function
test_bilingual_consistency_auditor_latex_formula_corruption
Test auditing LaTeX formula syntax and content preservation errors.
tests/test_ch10_bilingual_consistency_auditor.py:97
Function
test_bilingual_consistency_auditor_latex_formula_in_code_block
Test that dollar signs in code blocks do not trigger false formula errors.
tests/test_ch10_bilingual_consistency_auditor.py:170
Function
test_bilingual_consistency_auditor_link_target_mismatch
Test auditing link target mismatches.
tests/test_ch10_bilingual_consistency_auditor.py:110
Function
test_bilingual_consistency_auditor_non_overlapping_position_matching
Test that variant matching uses non-overlapping text position match (longest match first).
tests/test_ch10_bilingual_consistency_auditor.py:213
Function
test_bilingual_consistency_auditor_nonexistent_path_raises_error
Test that passing a non-existent Path object raises FileNotFoundError.
tests/test_ch10_bilingual_consistency_auditor.py:159
Function
test_bilingual_consistency_auditor_nonexistent_string_path_raises_error
Test that passing a non-existent string file path raises FileNotFoundError.
tests/test_ch10_bilingual_consistency_auditor.py:242
Function
test_bilingual_consistency_auditor_perfect_match
Test auditing a perfectly translated markdown document.
tests/test_ch10_bilingual_consistency_auditor.py:18
Function
test_bilingual_consistency_auditor_terminology_drift
Test auditing when terminology is missing or translated inconsistently.
tests/test_ch10_bilingual_consistency_auditor.py:60
Function
test_bilingual_consistency_auditor_text_ending_in_md_not_treated_as_path
Regression: single-line text ending in '.md' that is not an actual file must be treated as content, not raise FileNotFoundError. Old code trea
tests/test_ch10_bilingual_consistency_auditor.py:290
Function
test_bilingual_consistency_auditor_unbalanced_dollars_without_source_formulas
Test that unbalanced dollar signs in target document trigger error even if source has no formulas.
tests/test_ch10_bilingual_consistency_auditor.py:202
Method
test_binary_file_detection
Test binary file detection
chapter5/coding-agent/tests/test_read_tool.py:105
Function
test_blank_kimi_base_url_keeps_the_public_endpoint
A present-but-empty value means "not configured", not "no endpoint".
chapter1/web-search-agent/tests/test_config.py:110
Function
test_blank_lines_in_file_skipped
(tmp_path)
tests/test_ch8_sft_data_auditor.py:306
Function
test_blank_lines_in_file_skipped
(tmp_path)
tests/test_ch7_sft_data_auditor.py:306
Function
test_blank_still_zero
(tmp_path)
chapter7/public-health-reporting-eval/tests/test_excel_float_int.py:60
Function
test_blank_tests_field_loads_as_zero
(tmp_path)
chapter7/public-health-reporting-eval/tests/test_blank_csv_int.py:42
Function
test_blind_mapping_is_deterministic_bijective_and_image_specific
()
chapter8/MiniMind-pretrain/validation/test_vlm_training_report_audit.py:51
Function
test_blind_maps_are_deterministic_complete_permutations
()
chapter8/continued-pretraining/validation/test_report_audit.py:35
Method
test_block_events_during_auth_progress
Test that task events are BLOCKED when authentication is in progress (prevents data leak).
chapter9/browser-use-rpa/browser-use/tests/ci/test_sync_client_auth.py:426
Method
test_block_inside_inline_multiline
Test clicking a block element inside an inline element that spans multiple lines.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_event_ClickElementEvent.py:437
Function
test_blocked_attacks_count_matches
()
tests/test_ch2_prompt_injection_robustness.py:210
← previous
next →
10,201–10,300 of 13,003, ranked by callers