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_invoke_model_inspect_signature
()
tests/test_ch7_evaluate_multilingual.py:244
Function
test_invoke_model_inspect_signature
()
tests/test_ch8_evaluate_multilingual.py:244
Method
test_is_authenticated
Test authentication status check.
chapter9/browser-use-rpa/browser-use/tests/ci/test_sync_client_auth.py:85
Function
test_is_failure_answer_covers_every_failure_fallback
()
chapter1/web-search-agent/tests/test_examples.py:22
Function
test_is_new_tab_page
Test is_new_tab_page function
chapter9/browser-use-rpa/browser-use/tests/ci/test_agent_sensitive_data.py:258
Function
test_is_openrouter_key
(api_key, expected)
tests/test_providers.py:792
Function
test_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
Method
test_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
Method
test_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
Function
test_isolation_probe_must_preserve_outside_witness
()
chapter4/perception-tools/test_experiment_4_2.py:134
Function
test_issue_907_verifier_and_runner_use_experiment_9_1
()
tests/test_chapter_numbering_consistency.py:106
Function
test_issues_by_type_and_severity_populated
()
tests/test_ch8_sft_data_auditor.py:379
Function
test_issues_by_type_and_severity_populated
()
tests/test_ch7_sft_data_auditor.py:379
Function
test_issues_preserved
()
chapter5/paper-to-ppt/test_null_issues.py:21
Function
test_issues_preserved
()
chapter10/book-translation/tests/test_null_issues.py:13
Function
test_issues_scalar_like_empty
()
chapter10/book-translation/tests/test_non_dict_issue_item.py:27
Function
test_json_cards_add_memory_parses_stringified_json
()
chapter3/user-memory/test_json_cards_string_payload.py:11
Method
test_json_file_creation
Test JsonFile creation and basic properties.
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:46
Method
test_json_file_disk_operations
Test JSON file sync to disk operations.
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:117
Function
test_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
Function
test_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
Function
test_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
Function
test_judge_losslessly_repairs_ark_preference_fields_nested_in_variants
()
chapter10/book-translation/test_official_experiment.py:55
Function
test_judge_payload_does_not_reveal_training_stages
()
chapter8/continued-pretraining/validation/test_report_audit.py:43
Function
test_judge_requests_are_arm_blind_and_bound_to_exact_outputs
()
chapter8/MiniMind-pretrain/validation/test_training_report_audit.py:39
Function
test_judge_requires_evidence_for_every_dimension
()
chapter10/book-translation/test_official_experiment.py:37
Function
test_judge_retains_llm_decision_reason_in_action_evidence
(monkeypatch)
chapter10/voice-werewolf/test_user_simulator.py:121
Function
test_judge_retries_schema_failure_and_persists_raw_receipt
(tmp_path)
chapter10/book-translation/test_official_experiment.py:148
Function
test_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
Function
test_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
Method
test_jupyter_notebook_reading
Test Jupyter notebook reading
chapter5/coding-agent/tests/test_read_tool.py:151
Method
test_keeps_expression_like_text_as_data
(self)
chapter4/collaboration-tools/test_result_parsing.py:24
Function
test_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
Function
test_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
Method
test_kill_background_job
Test killing a background job using its background_job_id.
chapter5/coding-agent/tests/test_kill_bash_tool.py:59
Method
test_kill_nonexistent_session
Test error when trying to kill nonexistent session
chapter5/coding-agent/tests/test_kill_bash_tool.py:35
Method
test_kill_shell_session
Test killing a shell session
chapter5/coding-agent/tests/test_kill_bash_tool.py:14
Function
test_kimi_action_model_reserves_room_after_hidden_reasoning
()
chapter2/prompt-engineering/test_user_empty_response.py:54
Method
test_kimi_api_key_is_in_receipt_redaction_inputs
(self)
chapter4/collaboration-tools/test_run_experiment_4_5.py:87
Function
test_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
Function
test_kimi_base_url_reaches_the_client
(monkeypatch)
tests/test_ch1_learning_agent_kimi_base_url.py:53
Function
test_kimi_user_simulator_reserves_room_after_hidden_reasoning
(monkeypatch)
chapter2/prompt-engineering/test_user_empty_response.py:37
Function
test_known_value_fill_error_flows_back_to_phone_and_blocks_submission
()
chapter10/autonomous-phone-registration/test_orchestration.py:300
Function
test_krill_base_url_override
(monkeypatch)
tests/test_providers.py:185
Function
test_krill_keeps_bare_model_ids
(monkeypatch)
tests/test_providers.py:179
Function
test_krill_key_uses_multi_model_gateway_directly
(monkeypatch)
tests/test_providers.py:169
Function
test_krill_still_falls_back_when_its_key_is_missing
(monkeypatch)
tests/test_providers.py:395
Function
test_label_noise_clean_response_none
()
tests/test_ch8_sft_data_auditor.py:219
Function
test_label_noise_clean_response_none
()
tests/test_ch7_sft_data_auditor.py:219
Function
test_label_noise_contradiction
()
tests/test_ch8_sft_data_auditor.py:212
Function
test_label_noise_contradiction
()
tests/test_ch7_sft_data_auditor.py:212
Function
test_label_noise_placeholder_insert_marker
()
tests/test_ch8_sft_data_auditor.py:205
Function
test_label_noise_placeholder_insert_marker
()
tests/test_ch7_sft_data_auditor.py:205
Function
test_label_noise_placeholder_todo
()
tests/test_ch8_sft_data_auditor.py:196
Function
test_label_noise_placeholder_todo
()
tests/test_ch7_sft_data_auditor.py:196
Method
test_lambda_and_comprehensions_rejected
(self)
chapter1/context/tests/test_calc_sandbox.py:88
Method
test_large_file_write
Test writing large file
chapter5/coding-agent/tests/test_write_tool.py:134
Function
test_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
Function
test_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
Method
test_late_human_approval_does_not_authorize_publication
(self)
chapter4/collaboration-tools/test_run_experiment_4_5.py:112
Method
test_late_response_cannot_change_timed_out_request
(self)
chapter4/collaboration-tools/test_run_experiment_4_5.py:179
Function
test_latency_ms_from_latency_ms_field
()
tests/test_ch6_cost_efficiency_analyzer.py:140
Function
test_latency_ms_from_latency_ms_field
()
tests/test_ch7_cost_efficiency_analyzer.py:140
Function
test_latency_per_turn_aggregate
()
tests/test_ch6_cost_efficiency_analyzer.py:214
Function
test_latency_per_turn_aggregate
()
tests/test_ch7_cost_efficiency_analyzer.py:214
Function
test_latency_under_missing_threshold
()
chapter5/log-diagnosis/test_replay_latency.py:20
Function
test_latency_under_null_latency_ms
()
chapter5/log-diagnosis/test_replay_latency.py:4
Method
test_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
Function
test_latest_formal_run_passes_every_gate_in_one_report
()
chapter10/voice-werewolf/test_exp106_validation_evidence.py:106
Function
test_latest_real_browser_llm_recheck_passes_only_safe_gates
()
chapter10/autonomous-phone-registration/test_exp103_validation_evidence.py:33
Function
test_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
Function
test_leaderboard_sorting
Test that leaderboard is sorted by rating.
chapter7/elo-leaderboard/tests/test_elo.py:88
Function
test_leading_comma_does_not_raise
()
chapter4/perception-tools/test_parse_page_range_trailing_comma.py:24
Function
test_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
Function
test_legacy_amount_field_is_still_valid_evidence
()
tests/test_ch9_factual_grounding.py:97
Function
test_legacy_catalog_came_from_mcp_and_retains_the_126_tool_contract
()
chapter4/perception-tools/test_real_experiment_4_2_evidence.py:37
Method
test_legacy_heatmap_marks_continuations_on_both_axes
(self)
chapter2/attention_visualization/test_visualization.py:61
Function
test_legacy_kimi_key_still_accepted
(monkeypatch)
tests/test_providers.py:130
Function
test_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
Function
test_length_calibration_uses_fresh_messages_and_scores_only_final_reply
()
chapter4/active-tool-discovery/test_selection_ablation.py:25
Function
test_length_outlier_too_long
()
tests/test_ch8_sft_data_auditor.py:145
Function
test_length_outlier_too_long
()
tests/test_ch7_sft_data_auditor.py:145
Function
test_length_outlier_too_short
()
tests/test_ch8_sft_data_auditor.py:137
Function
test_length_outlier_too_short
()
tests/test_ch7_sft_data_auditor.py:137
Method
test_length_tracking
Test old_length and new_length tracking
chapter5/coding-agent/tests/test_edit_tool.py:173
Function
test_length_within_bounds_no_outlier
()
tests/test_ch8_sft_data_auditor.py:154
Function
test_length_within_bounds_no_outlier
()
tests/test_ch7_sft_data_auditor.py:154
Function
test_library_requires_exact_cartesian_product
(tmp_path)
chapter6/controllable-tts/test_fish_s1.py:45
Function
test_limit_zero_on_nonempty_file
(system_state, temp_dir)
chapter5/coding-agent/tests/test_read_limit_zero.py:4
Function
test_limit_zero_returns_empty
(tmp_path, monkeypatch)
chapter3/user-memory/test_recent_turns_limit_zero.py:11
Method
test_line_numbers_format
Test cat -n format with line numbers starting at 1
chapter5/coding-agent/tests/test_read_tool.py:26
Function
test_linked_json_files_finds_script_and_iframe_linked_jsons
()
tests/test_core_clean_site_links.py:32
Method
test_lint_check_after_edit
Test that lint check runs after Python file edit
chapter5/coding-agent/tests/test_edit_tool.py:141
Method
test_lint_check_after_multi_edit
Test lint checking after multiple edits
chapter5/coding-agent/tests/test_multi_edit_tool.py:197
Method
test_linux_with_cuda_uses_vllm
(self)
chapter2/local_llm_serving/test_platform_detection.py:27
Method
test_linux_without_cuda_uses_ollama
(self)
chapter2/local_llm_serving/test_platform_detection.py:36
Method
test_list_allowed_directories
Test listing allowed directories.
chapter4/execution-tools/test_filesystem_enhanced.py:354
Method
test_list_directory
Test listing directory.
chapter4/execution-tools/test_terminal_controller.py:87
Method
test_list_directory_with_sizes
Test listing directory with file sizes.
chapter4/execution-tools/test_filesystem_enhanced.py:117
Method
test_list_files
Test listing files in the filesystem.
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:300
← previous
next →
11,301–11,400 of 13,003, ranked by callers