MCPcopy Create free account

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

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

Functiontest_invoke_model_inspect_signature
()
tests/test_ch7_evaluate_multilingual.py:244
Functiontest_invoke_model_inspect_signature
()
tests/test_ch8_evaluate_multilingual.py:244
Methodtest_is_authenticated
Test authentication status check.
chapter9/browser-use-rpa/browser-use/tests/ci/test_sync_client_auth.py:85
Functiontest_is_failure_answer_covers_every_failure_fallback
()
chapter1/web-search-agent/tests/test_examples.py:22
Functiontest_is_new_tab_page
Test is_new_tab_page function
chapter9/browser-use-rpa/browser-use/tests/ci/test_agent_sensitive_data.py:258
Functiontest_is_openrouter_key
(api_key, expected)
tests/test_providers.py:792
Functiontest_is_openrouter_key_does_not_influence_resolution
Attribution is for callers choosing a provider, not for the resolver. ``api_key`` means "this provider's credential"; honouring the prefix here
tests/test_providers.py:796
Methodtest_is_root_domain_helper
Test the _is_root_domain helper method logic.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_watchdog_security2.py:257
Methodtest_is_url_allowed
Test the _is_url_allowed method to verify that it correctly checks URLs against the allowed domains configuration.
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry_action_parameter_injection.py:78
Functiontest_isolation_probe_must_preserve_outside_witness
()
chapter4/perception-tools/test_experiment_4_2.py:134
Functiontest_issue_907_verifier_and_runner_use_experiment_9_1
()
tests/test_chapter_numbering_consistency.py:106
Functiontest_issues_by_type_and_severity_populated
()
tests/test_ch8_sft_data_auditor.py:379
Functiontest_issues_by_type_and_severity_populated
()
tests/test_ch7_sft_data_auditor.py:379
Functiontest_issues_preserved
()
chapter5/paper-to-ppt/test_null_issues.py:21
Functiontest_issues_preserved
()
chapter10/book-translation/tests/test_null_issues.py:13
Functiontest_issues_scalar_like_empty
()
chapter10/book-translation/tests/test_non_dict_issue_item.py:27
Functiontest_json_cards_add_memory_parses_stringified_json
()
chapter3/user-memory/test_json_cards_string_payload.py:11
Methodtest_json_file_creation
Test JsonFile creation and basic properties.
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:46
Methodtest_json_file_disk_operations
Test JSON file sync to disk operations.
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:117
Functiontest_judge_gemini_audio_blocked_raises_clear_error
Blocked/empty Gemini responses raise a clear RuntimeError, not KeyError/IndexError.
chapter7/tts-quality-eval/tests/test_judge_robustness.py:101
Functiontest_judge_gemini_audio_falls_back_to_openrouter
An unavailable direct key keeps both clips on a direct-audio fallback route.
chapter7/tts-quality-eval/tests/test_judge_robustness.py:133
Functiontest_judge_gemini_audio_parses_valid_response
A normal Gemini response still parses (defensive navigation keeps working).
chapter7/tts-quality-eval/tests/test_judge_robustness.py:112
Functiontest_judge_losslessly_repairs_ark_preference_fields_nested_in_variants
()
chapter10/book-translation/test_official_experiment.py:55
Functiontest_judge_payload_does_not_reveal_training_stages
()
chapter8/continued-pretraining/validation/test_report_audit.py:43
Functiontest_judge_requests_are_arm_blind_and_bound_to_exact_outputs
()
chapter8/MiniMind-pretrain/validation/test_training_report_audit.py:39
Functiontest_judge_requires_evidence_for_every_dimension
()
chapter10/book-translation/test_official_experiment.py:37
Functiontest_judge_retains_llm_decision_reason_in_action_evidence
(monkeypatch)
chapter10/voice-werewolf/test_user_simulator.py:121
Functiontest_judge_retries_schema_failure_and_persists_raw_receipt
(tmp_path)
chapter10/book-translation/test_official_experiment.py:148
Functiontest_judge_rubric_tolerates_null_dimension
A bare null dimension (non-dict) is scored 0, not int(None) TypeError.
chapter7/tts-quality-eval/tests/test_judge_robustness.py:66
Functiontest_judge_rubric_tolerates_null_score
score': null in a dimension dict is scored 0, not int(None) TypeError.
chapter7/tts-quality-eval/tests/test_judge_robustness.py:52
Methodtest_jupyter_notebook_reading
Test Jupyter notebook reading
chapter5/coding-agent/tests/test_read_tool.py:151
Methodtest_keeps_expression_like_text_as_data
(self)
chapter4/collaboration-tools/test_result_parsing.py:24
Functiontest_keyless_aggregator_still_gets_a_placeholder_key
Every backend needs a non-empty key: the OpenAI client rejects ``""``. The aggregator branch used to skip the placeholder fallback, so a keyless
tests/test_providers.py:729
Functiontest_keyless_provider_resolves_without_any_key
Config.validate and similar callers must not treat a keyless provider as unconfigured -- ollama needs no key at all.
tests/test_providers.py:609
Methodtest_kill_background_job
Test killing a background job using its background_job_id.
chapter5/coding-agent/tests/test_kill_bash_tool.py:59
Methodtest_kill_nonexistent_session
Test error when trying to kill nonexistent session
chapter5/coding-agent/tests/test_kill_bash_tool.py:35
Methodtest_kill_shell_session
Test killing a shell session
chapter5/coding-agent/tests/test_kill_bash_tool.py:14
Functiontest_kimi_action_model_reserves_room_after_hidden_reasoning
()
chapter2/prompt-engineering/test_user_empty_response.py:54
Methodtest_kimi_api_key_is_in_receipt_redaction_inputs
(self)
chapter4/collaboration-tools/test_run_experiment_4_5.py:87
Functiontest_kimi_base_url_is_read_from_the_environment
env.example and the README document KIMI_BASE_URL, so it must take effect.
chapter1/web-search-agent/tests/test_config.py:103
Functiontest_kimi_base_url_reaches_the_client
(monkeypatch)
tests/test_ch1_learning_agent_kimi_base_url.py:53
Functiontest_kimi_user_simulator_reserves_room_after_hidden_reasoning
(monkeypatch)
chapter2/prompt-engineering/test_user_empty_response.py:37
Functiontest_known_value_fill_error_flows_back_to_phone_and_blocks_submission
()
chapter10/autonomous-phone-registration/test_orchestration.py:300
Functiontest_krill_base_url_override
(monkeypatch)
tests/test_providers.py:185
Functiontest_krill_keeps_bare_model_ids
(monkeypatch)
tests/test_providers.py:179
Functiontest_krill_key_uses_multi_model_gateway_directly
(monkeypatch)
tests/test_providers.py:169
Functiontest_krill_still_falls_back_when_its_key_is_missing
(monkeypatch)
tests/test_providers.py:395
Functiontest_label_noise_clean_response_none
()
tests/test_ch8_sft_data_auditor.py:219
Functiontest_label_noise_clean_response_none
()
tests/test_ch7_sft_data_auditor.py:219
Functiontest_label_noise_contradiction
()
tests/test_ch8_sft_data_auditor.py:212
Functiontest_label_noise_contradiction
()
tests/test_ch7_sft_data_auditor.py:212
Functiontest_label_noise_placeholder_insert_marker
()
tests/test_ch8_sft_data_auditor.py:205
Functiontest_label_noise_placeholder_insert_marker
()
tests/test_ch7_sft_data_auditor.py:205
Functiontest_label_noise_placeholder_todo
()
tests/test_ch8_sft_data_auditor.py:196
Functiontest_label_noise_placeholder_todo
()
tests/test_ch7_sft_data_auditor.py:196
Methodtest_lambda_and_comprehensions_rejected
(self)
chapter1/context/tests/test_calc_sandbox.py:88
Methodtest_large_file_write
Test writing large file
chapter5/coding-agent/tests/test_write_tool.py:134
Functiontest_late_decision_rejection_is_logged
Regression: late human decision after timeout fallback must be explicitly rejected with a log warning, not silently dropped.
tests/test_ch4_notification_dispatcher.py:397
Functiontest_late_decision_submission_rejected_after_fallback
Test that submitting a decision after fallback policy has triggered returns False.
tests/test_ch4_notification_dispatcher.py:244
Methodtest_late_human_approval_does_not_authorize_publication
(self)
chapter4/collaboration-tools/test_run_experiment_4_5.py:112
Methodtest_late_response_cannot_change_timed_out_request
(self)
chapter4/collaboration-tools/test_run_experiment_4_5.py:179
Functiontest_latency_ms_from_latency_ms_field
()
tests/test_ch6_cost_efficiency_analyzer.py:140
Functiontest_latency_ms_from_latency_ms_field
()
tests/test_ch7_cost_efficiency_analyzer.py:140
Functiontest_latency_per_turn_aggregate
()
tests/test_ch6_cost_efficiency_analyzer.py:214
Functiontest_latency_per_turn_aggregate
()
tests/test_ch7_cost_efficiency_analyzer.py:214
Functiontest_latency_under_missing_threshold
()
chapter5/log-diagnosis/test_replay_latency.py:20
Functiontest_latency_under_null_latency_ms
()
chapter5/log-diagnosis/test_replay_latency.py:4
Methodtest_later_tool_success_does_not_ground_an_earlier_claim
A future action cannot support an already-emitted success claim.
chapter9/trajectory-verifier/test_claim_action_order.py:79
Functiontest_latest_formal_run_passes_every_gate_in_one_report
()
chapter10/voice-werewolf/test_exp106_validation_evidence.py:106
Functiontest_latest_real_browser_llm_recheck_passes_only_safe_gates
()
chapter10/autonomous-phone-registration/test_exp103_validation_evidence.py:33
Functiontest_layout_index_map_handles_null_layout_arrays
Ensure layout array checks tolerate None for bounds, styles, paintOrders, etc.
chapter9/browser-use-rpa/browser-use/browser_use/dom/test_enhanced_snapshot_null_layout.py:12
Functiontest_leaderboard_sorting
Test that leaderboard is sorted by rating.
chapter7/elo-leaderboard/tests/test_elo.py:88
Functiontest_leading_comma_does_not_raise
()
chapter4/perception-tools/test_parse_page_range_trailing_comma.py:24
Functiontest_ledger_links_resolve_to_existing_files
Every ledger link in the detailed-ledgers section must point to a real file.
tests/test_docs_experiment_status_links.py:27
Functiontest_legacy_amount_field_is_still_valid_evidence
()
tests/test_ch9_factual_grounding.py:97
Functiontest_legacy_catalog_came_from_mcp_and_retains_the_126_tool_contract
()
chapter4/perception-tools/test_real_experiment_4_2_evidence.py:37
Methodtest_legacy_heatmap_marks_continuations_on_both_axes
(self)
chapter2/attention_visualization/test_visualization.py:61
Functiontest_legacy_kimi_key_still_accepted
(monkeypatch)
tests/test_providers.py:130
Functiontest_legitimate_mutation_not_flagged_as_escalation
Regression test: normal mutation by authorized user does not fail escalation check.
tests/test_ch5_pedo_live_security_eval.py:262
Functiontest_length_calibration_uses_fresh_messages_and_scores_only_final_reply
()
chapter4/active-tool-discovery/test_selection_ablation.py:25
Functiontest_length_outlier_too_long
()
tests/test_ch8_sft_data_auditor.py:145
Functiontest_length_outlier_too_long
()
tests/test_ch7_sft_data_auditor.py:145
Functiontest_length_outlier_too_short
()
tests/test_ch8_sft_data_auditor.py:137
Functiontest_length_outlier_too_short
()
tests/test_ch7_sft_data_auditor.py:137
Methodtest_length_tracking
Test old_length and new_length tracking
chapter5/coding-agent/tests/test_edit_tool.py:173
Functiontest_length_within_bounds_no_outlier
()
tests/test_ch8_sft_data_auditor.py:154
Functiontest_length_within_bounds_no_outlier
()
tests/test_ch7_sft_data_auditor.py:154
Functiontest_library_requires_exact_cartesian_product
(tmp_path)
chapter6/controllable-tts/test_fish_s1.py:45
Functiontest_limit_zero_on_nonempty_file
(system_state, temp_dir)
chapter5/coding-agent/tests/test_read_limit_zero.py:4
Functiontest_limit_zero_returns_empty
(tmp_path, monkeypatch)
chapter3/user-memory/test_recent_turns_limit_zero.py:11
Methodtest_line_numbers_format
Test cat -n format with line numbers starting at 1
chapter5/coding-agent/tests/test_read_tool.py:26
Functiontest_linked_json_files_finds_script_and_iframe_linked_jsons
()
tests/test_core_clean_site_links.py:32
Methodtest_lint_check_after_edit
Test that lint check runs after Python file edit
chapter5/coding-agent/tests/test_edit_tool.py:141
Methodtest_lint_check_after_multi_edit
Test lint checking after multiple edits
chapter5/coding-agent/tests/test_multi_edit_tool.py:197
Methodtest_linux_with_cuda_uses_vllm
(self)
chapter2/local_llm_serving/test_platform_detection.py:27
Methodtest_linux_without_cuda_uses_ollama
(self)
chapter2/local_llm_serving/test_platform_detection.py:36
Methodtest_list_allowed_directories
Test listing allowed directories.
chapter4/execution-tools/test_filesystem_enhanced.py:354
Methodtest_list_directory
Test listing directory.
chapter4/execution-tools/test_terminal_controller.py:87
Methodtest_list_directory_with_sizes
Test listing directory with file sizes.
chapter4/execution-tools/test_filesystem_enhanced.py:117
Methodtest_list_files
Test listing files in the filesystem.
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:300
← previousnext →11,301–11,400 of 13,003, ranked by callers