MCPcopy Create free account

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

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

Functiontest_assignee_must_be_member
(pm_store, project_admin, member)
chapter5/permission-embedded-data-objects/tests/test_scenarios.py:250
Functiontest_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
Functiontest_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
Functiontest_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
Functiontest_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
Functiontest_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
Functiontest_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
Functiontest_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
Functiontest_async_function_quality_scoring
Regression test: async functions are recognized for docstrings and type annotations.
tests/test_ch9_hermes_downstream_ablation.py:192
Functiontest_async_function_quality_scoring
Regression test: async functions are recognized for docstrings and type annotations.
tests/test_ch8_hermes_downstream_ablation.py:192
Functiontest_atlascloud_base_url_override
(monkeypatch)
tests/test_providers.py:232
Functiontest_atlascloud_key_uses_multi_model_gateway_directly
(monkeypatch)
tests/test_providers.py:217
Functiontest_atlascloud_namespaces_bare_model_ids
(monkeypatch)
tests/test_providers.py:227
Methodtest_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
Methodtest_atomic_edits
Test that if any edit fails, none are applied
chapter5/coding-agent/tests/test_multi_edit_tool.py:66
Functiontest_audit_empty_markdown_documents
()
tests/test_ch10_consistency_auditor_empty_inputs.py:19
Functiontest_audit_empty_source_with_non_empty_target
()
tests/test_ch10_consistency_auditor_empty_inputs.py:34
Methodtest_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
Methodtest_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
Methodtest_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
Methodtest_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
Functiontest_authorization_basic_case_insensitive
()
chapter3/log-sanitization/tests/test_authorization_basic.py:13
Functiontest_authorization_basic_redacted
()
chapter3/log-sanitization/tests/test_authorization_basic.py:5
Methodtest_auto_recursive_prefix
Test that patterns without **/ are auto-prefixed
chapter5/coding-agent/tests/test_glob_tool.py:37
Methodtest_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
Functiontest_availability_groups_failures_and_computes_mttr
()
chapter7/model-benchmark/test_campaign.py:158
Functiontest_backend_unpacks_like_the_old_tuple
(monkeypatch)
tests/test_providers.py:489
Methodtest_background_execution
Test run_in_background parameter
chapter5/coding-agent/tests/test_bash_tool.py:106
Methodtest_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
Functiontest_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
Functiontest_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
Functiontest_backoff_curves_with_non_dict_and_zero_backoff_429
()
tests/test_ch7_rate_ramp_benchmark.py:145
Functiontest_backoff_curves_with_non_dict_and_zero_backoff_429
()
tests/test_ch6_rate_ramp_benchmark.py:145
Functiontest_bad_cases_category_balance
()
chapter8/premature-completion-dpo/test_pipeline.py:59
Functiontest_bad_cases_structure
()
chapter8/premature-completion-dpo/test_pipeline.py:45
Methodtest_bad_fix_is_retained_with_concrete_rejection_reason
(self)
chapter9/self-modifying-agent/test_evolution.py:54
Functiontest_bad_route_value
()
chapter1/image-gen-workflow/tests/test_manifest_schema.py:76
Functiontest_baggage_policy_business_cabin
()
chapter9/prompt-auto-optimization/tests/test_baggage_policy_null.py:20
Functiontest_baggage_policy_missing_cabin
()
chapter9/prompt-auto-optimization/tests/test_baggage_policy_null.py:14
Functiontest_baggage_policy_null_cabin
()
chapter9/prompt-auto-optimization/tests/test_baggage_policy_null.py:6
Functiontest_bare_object_type_stays_empty_properties
()
chapter9/self-evolving-tools/test_normalize_schema_bare_object.py:6
Functiontest_barge_in_cancels_playback_and_transcribes_without_real_audio
(monkeypatch, tmp_path)
chapter10/voice-werewolf/test_live_human.py:237
Functiontest_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
Functiontest_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
Functiontest_base_trajectory_has_three_calls_and_four_distractors
()
chapter2/attention_visualization/test_status_bar_experiment.py:16
Functiontest_base_url_override
(monkeypatch)
tests/test_providers.py:463
Functiontest_bash_roundtrip_with_real_bash
()
chapter4/execution-tools/test_bash_lookup.py:70
Methodtest_basic_command
Test basic command execution
chapter5/coding-agent/tests/test_bash_tool.py:15
Methodtest_basic_command_and_exit_code
Normal commands still work and report exit codes
chapter5/coding-agent/tests/test_shell_session.py:93
Methodtest_basic_edit
Test basic search and replace
chapter5/coding-agent/tests/test_edit_tool.py:14
Functiontest_basic_functionality
Pytest contract: failures are assertions, not a returned status value.
chapter3/contextual-retrieval/test_simple.py:129
Functiontest_basic_functionality
Pytest contract: surface helper failure as an assertion.
chapter3/agentic-rag/test_simple.py:129
Methodtest_basic_glob
Test basic glob pattern
chapter5/coding-agent/tests/test_glob_tool.py:13
Methodtest_basic_listing
Test basic directory listing
chapter5/coding-agent/tests/test_ls_tool.py:14
Methodtest_basic_plan_submission
Test submitting a plan
chapter5/coding-agent/tests/test_exit_plan_mode_tool.py:13
Methodtest_basic_read
Test basic file reading
chapter5/coding-agent/tests/test_read_tool.py:15
Functiontest_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
Methodtest_basic_search
Test basic pattern search
chapter5/coding-agent/tests/test_grep_tool.py:13
Methodtest_basic_write
Test basic file writing
chapter5/coding-agent/tests/test_write_tool.py:14
Functiontest_batch_counts_accumulate_across_resumed_invocations
(tmp_path: Path)
chapter7/model-benchmark/test_campaign.py:134
Functiontest_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
Functiontest_bearer_still_redacted
()
chapter3/log-sanitization/tests/test_authorization_basic.py:20
Functiontest_behavior_classifier_distinguishes_call_and_refusal
()
chapter2/attention_visualization/test_status_bar_experiment.py:30
Functiontest_behavior_flags_cover_acceptance_categories
()
chapter8/cot-distillation/test_student_pipeline.py:34
Methodtest_behavior_metrics_are_evaluated_in_sandbox
(self)
chapter9/self-modifying-agent/test_evolution.py:36
Methodtest_below_threshold_cluster_is_ignored
(self)
chapter9/harness-safety-gate/test_evolution.py:43
Functiontest_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
Functiontest_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
Functiontest_best_none_skip_logic
()
chapter3/structured-knowledge-extraction/test_archetypes_small_charge.py:14
Functiontest_best_stage_combination_is_highest_ndcg_prefix
()
tests/test_ch3_retrieval_stage_evaluator.py:309
Functiontest_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
Functiontest_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
Functiontest_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
Functiontest_bilingual_consistency_auditor_code_block_mismatch
Test auditing code block synchronization errors.
tests/test_ch10_bilingual_consistency_auditor.py:73
Functiontest_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
Functiontest_bilingual_consistency_auditor_custom_glossary
Test auditing with a custom terminology glossary.
tests/test_ch10_bilingual_consistency_auditor.py:139
Functiontest_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
Functiontest_bilingual_consistency_auditor_file_path_inputs
Test auditing with actual file path inputs on disk.
tests/test_ch10_bilingual_consistency_auditor.py:124
Functiontest_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
Functiontest_bilingual_consistency_auditor_latex_formula_corruption
Test auditing LaTeX formula syntax and content preservation errors.
tests/test_ch10_bilingual_consistency_auditor.py:97
Functiontest_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
Functiontest_bilingual_consistency_auditor_link_target_mismatch
Test auditing link target mismatches.
tests/test_ch10_bilingual_consistency_auditor.py:110
Functiontest_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
Functiontest_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
Functiontest_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
Functiontest_bilingual_consistency_auditor_perfect_match
Test auditing a perfectly translated markdown document.
tests/test_ch10_bilingual_consistency_auditor.py:18
Functiontest_bilingual_consistency_auditor_terminology_drift
Test auditing when terminology is missing or translated inconsistently.
tests/test_ch10_bilingual_consistency_auditor.py:60
Functiontest_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
Functiontest_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
Methodtest_binary_file_detection
Test binary file detection
chapter5/coding-agent/tests/test_read_tool.py:105
Functiontest_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
Functiontest_blank_lines_in_file_skipped
(tmp_path)
tests/test_ch8_sft_data_auditor.py:306
Functiontest_blank_lines_in_file_skipped
(tmp_path)
tests/test_ch7_sft_data_auditor.py:306
Functiontest_blank_still_zero
(tmp_path)
chapter7/public-health-reporting-eval/tests/test_excel_float_int.py:60
Functiontest_blank_tests_field_loads_as_zero
(tmp_path)
chapter7/public-health-reporting-eval/tests/test_blank_csv_int.py:42
Functiontest_blind_mapping_is_deterministic_bijective_and_image_specific
()
chapter8/MiniMind-pretrain/validation/test_vlm_training_report_audit.py:51
Functiontest_blind_maps_are_deterministic_complete_permutations
()
chapter8/continued-pretraining/validation/test_report_audit.py:35
Methodtest_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
Methodtest_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
Functiontest_blocked_attacks_count_matches
()
tests/test_ch2_prompt_injection_robustness.py:210
← previousnext →10,201–10,300 of 13,003, ranked by callers