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_streaming_history_preserves_assistant_turn_before_tool_results
()
chapter2/local_llm_serving/test_ollama_thinking.py:68
Function
test_string_edit_item_skipped_with_warning
()
chapter9/prompt-auto-optimization/test_non_dict_edit.py:7
Function
test_string_issue_items_dropped
()
chapter10/book-translation/tests/test_non_dict_issue_item.py:5
Method
test_string_not_found
Test error when old_string not found
chapter5/coding-agent/tests/test_edit_tool.py:80
Function
test_stringify_numeric_ids_in_citation
Verify that numeric node IDs, children, parents, and entity_ids do not cause TypeError during citation building.
chapter3/structured-index/test_hybrid_retriever.py:45
Function
test_strip_drops_reasoning_entirely
()
chapter5/provider-failover/tests/test_offline.py:64
Function
test_structural_gate_requires_common_live_cli
(tmp_path: Path)
chapter5/agent-creator/test_creator.py:243
Function
test_structured_pii_items_preserve_original_value
(tmp_path)
chapter3/log-sanitization/tests/test_sanitize_conversation.py:89
Function
test_subagent_env_or_default_falls_back
(monkeypatch)
chapter4/collaboration-tools/test_config_env.py:42
Function
test_subagent_env_or_default_parses_valid
(monkeypatch)
chapter4/collaboration-tools/test_config_env.py:47
Function
test_submit_decision_non_boolean_approved
Test submit_decision with non-boolean approved argument preserves custom decision string.
tests/test_ch4_notification_dispatcher.py:365
Function
test_subprocess_detected_medium_risk
subprocess module usage is detected and classified as medium.
tests/test_ch5_sandbox_evaluator.py:113
Method
test_subscript_is_rejected
(self)
chapter1/context/tests/test_calc_sandbox.py:80
Function
test_subscription_type_filtering
()
tests/test_ch10_subscription_empty_types.py:13
Method
test_subsecond_timeout_ms_allows_fast_command
timeout=500ms must not collapse to 0s via int(ms/1000).
chapter5/coding-agent/tests/test_bash_tool.py:188
Method
test_subsecond_timeout_ms_still_enforced
A 300ms budget must still time out a longer sleep.
chapter5/coding-agent/tests/test_bash_tool.py:200
Function
test_subset_can_never_claim_full_suite_completion
()
chapter7/android-world/test_experiment.py:169
Function
test_success_commits_once_then_publishes_all_delete_reactions
(store)
tests/test_ch5_pedo_atomic_delete.py:172
Function
test_success_gain_over_cost_guardrail_is_not_promoted
()
chapter7/android-world/test_experiment.py:272
Function
test_success_run_requires_image_with_sha256
()
chapter1/image-gen-workflow/tests/test_manifest_schema.py:82
Function
test_summarize_arm_accepts_correct_answer_even_in_an_ablated_arm
()
chapter1/context/test_experiment_1_1.py:113
Function
test_summarize_arm_flags_numbers_no_observation_supports
()
chapter1/context/test_experiment_1_1.py:156
Function
test_summarize_arm_separates_completion_from_task_success
()
chapter1/context/test_experiment_1_1.py:97
Function
test_summarize_offline_handles_numeric_zero_baggage
Prove summarize_offline treats numeric 0 baggage count as no free baggage. When submitted form data contains integer 0 (e.g. from JSON deserializ
chapter5/dynamic-form/test_summarize_numeric_zero_baggage.py:11
Function
test_summarize_offline_handles_positive_baggage
Prove summarize_offline formats positive baggage count correctly.
chapter5/dynamic-form/test_summarize_numeric_zero_baggage.py:50
Function
test_summarize_offline_handles_string_zero_baggage
Prove summarize_offline treats string '0' baggage count as no free baggage.
chapter5/dynamic-form/test_summarize_numeric_zero_baggage.py:36
Method
test_summary_groups_models
(self)
chapter7/model-action-threshold/tests/test_experiment.py:55
Function
test_supervisor_detects_provider_error_in_live_checkpoint
(tmp_path)
chapter10/generative-agents/tests/test_campaign_storage.py:26
Method
test_support_threshold_creates_change_request
(self)
chapter9/harness-safety-gate/test_evolution.py:33
Function
test_supported_by_cannot_bypass_real_call_order
(turn)
tests/test_ch9_factual_grounding.py:62
Method
test_supported_conclusion_passes
A final answer grounded in the evidence chain passes.
tests/test_ch8_trajectory_consistency_checker.py:204
Method
test_supported_conclusion_passes
A final answer grounded in the evidence chain passes.
tests/test_ch9_trajectory_consistency_checker.py:204
Function
test_supported_providers_covers_registry_and_aliases
Chapter CLIs build --provider choices from this, so a new registry entry must be selectable without touching argparse.
tests/test_providers.py:535
Function
test_supported_providers_helper_sees_late_registrations
``SUPPORTED_PROVIDERS`` is an import-time snapshot; the helper is live.
tests/test_providers.py:808
Method
test_suspended_call_never_reaches_executor
(self)
chapter9/harness-safety-gate/test_evolution.py:176
Method
test_switch_tab_operations
Test tab creation, switching, and closing operations.
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry_action_parameter_injection.py:259
Method
test_sync_action_wrapper
Test that sync functions are properly wrapped to be async
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:440
Function
test_sync_wrapper
Test synchronous dispatch_and_wait_sync wrapper.
tests/test_ch4_notification_dispatcher.py:184
Function
test_syntax_verification_rejects_invalid_python
(monkeypatch)
chapter4/execution-tools/test_execution_tools.py:140
Function
test_system_hint_agent_handles_empty_string_error_in_tool_result
(caplog)
tests/test_ch1_ch2_system_hint_tool_error_null.py:68
Function
test_system_hint_agent_handles_none_error_in_tool_result
(caplog)
tests/test_ch1_ch2_system_hint_tool_error_null.py:58
Function
test_system_hint_agent_handles_valid_error_string
(caplog)
tests/test_ch1_ch2_system_hint_tool_error_null.py:77
Method
test_system_hint_structure
Test that system hint includes all required sections
chapter5/coding-agent/tests/test_integration.py:16
Function
test_system_retains_cross_tenant_access_and_create
(store)
tests/test_ch5_pedo_tenant_isolation.py:125
Function
test_system_speech_falls_back_to_macos_say
(monkeypatch, tmp_path)
chapter10/voice-werewolf/test_user_simulator.py:191
Function
test_tail_lines_positive_still_keeps_tail
()
chapter4/execution-tools/test_truncate_tail_lines_zero.py:17
Function
test_tail_lines_zero_keeps_only_head
()
chapter4/execution-tools/test_truncate_tail_lines_zero.py:5
Method
test_take_screenshot
Test that take_screenshot returns a valid base64 encoded image.
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry_action_parameter_injection.py:234
Function
test_tampered_request_image_fails_even_after_resealing
(tmp_path)
chapter8/MiniMind-pretrain/validation/test_vlm_training_report_audit.py:125
Function
test_tampered_retained_output_fails_even_after_resealing
(tmp_path)
chapter8/MiniMind-pretrain/validation/test_vlm_training_report_audit.py:114
Function
test_targeted_resume_preserves_verified_rows_and_retries_failure
(tmp_path, monkeypatch)
chapter8/cot-distillation/test_empty_problems.py:63
Function
test_task_completed_triggers_submission_when_browser_is_opted_in
()
chapter10/autonomous-phone-registration/test_orchestration.py:163
Function
test_task_decomp_generation_cleans_malformed_response_without_requery
()
chapter10/generative-agents/tests/test_runner_helpers.py:78
Function
test_task_decomp_generation_raises_after_five_unparseable_responses
()
chapter10/generative-agents/tests/test_runner_helpers.py:103
Function
test_task_decomp_normalization_discards_prose_and_bounds_duration
()
chapter10/generative-agents/tests/test_runner_helpers.py:64
Function
test_task_lifecycle
(pm_store, project_admin, member)
chapter5/permission-embedded-data-objects/tests/test_scenarios.py:195
Function
test_telemetry_capture_with_mock
Test telemetry capture with mocked PostHog client.
chapter9/browser-use-rpa/browser-use/tests/ci/test_telemetry.py:161
Function
test_telemetry_device_id_uses_config_dir
Test that telemetry device_id is stored in config directory, not cache directory.
chapter9/browser-use-rpa/browser-use/tests/ci/test_telemetry.py:268
Function
test_telemetry_disabled_when_config_false
Test that telemetry is disabled when ANONYMIZED_TELEMETRY is False.
chapter9/browser-use-rpa/browser-use/tests/ci/test_telemetry.py:55
Function
test_telemetry_enabled_when_config_true
Test that telemetry is enabled when ANONYMIZED_TELEMETRY is True.
chapter9/browser-use-rpa/browser-use/tests/ci/test_telemetry.py:75
Function
test_telemetry_flush
Test telemetry flush method.
chapter9/browser-use-rpa/browser-use/tests/ci/test_telemetry.py:191
Function
test_telemetry_user_id_generation
Test that telemetry generates and persists user ID.
chapter9/browser-use-rpa/browser-use/tests/ci/test_telemetry.py:210
Function
test_template_mode_copies_core_and_applies_specialization
(tmp_path: Path)
chapter5/agent-creator/test_creator.py:157
Function
test_temporal_guest_access
Test that guest access with expired temporal bounds is denied.
chapter5/permission-embedded-data-objects/tests/test_scenarios.py:301
Function
test_temporal_permission
Test that time-bounded permissions work.
chapter5/permission-embedded-data-objects/tests/test_core.py:127
Function
test_tenant_isolation
(pm_store, project_admin, other_tenant_member)
chapter5/permission-embedded-data-objects/tests/test_scenarios.py:266
Function
test_tenant_read_requires_matching_org
(store, org)
tests/test_ch5_pedo_tenant_isolation.py:60
Function
test_text_deny_decision_recorded_as_rejected
Regression: human-submitted text 'deny' must be recorded as rejected (approved=False), not approved.
tests/test_ch4_notification_dispatcher.py:446
Function
test_text_reject_decision_recorded_as_rejected
Regression: human-submitted text 'reject' must be recorded as rejected (approved=False), not approved.
tests/test_ch4_notification_dispatcher.py:426
Function
test_the_right_answer_with_no_observations_is_still_ungrounded
()
chapter1/context/test_grounding.py:85
Function
test_three_cycles_count_only_after_night_day_vote_and_round_cap_is_not_fake_win
(capsys)
chapter10/voice-werewolf/test_live_human.py:112
Function
test_three_email_workflow_and_acceptance
(tmp_path)
chapter6/agent-with-event-trigger/test_unipile_mailbox_experiment.py:89
Function
test_tie_bothbad_does_not_poison_the_leaderboard
One 'tie (bothbad)' battle used to NaN every rating, including model c.
chapter7/elo-leaderboard/tests/test_tie_bothbad.py:27
Function
test_tie_bothbad_does_not_produce_nan_outcomes
tie (bothbad)' maps to a tie instead of NaN.
chapter7/elo-leaderboard/tests/test_tie_bothbad.py:15
Function
test_tie_half_wins_are_not_truncated
()
chapter7/elo-leaderboard/tests/test_animation_tie_wins.py:6
Function
test_ties_change_ratings_versus_wins_only
()
chapter7/elo-leaderboard/tests/test_bt_tie_pivot.py:22
Function
test_timeout_answer_names_the_budget_and_the_429_suspect
"Request timed out." alone reads like a network fault; the reader has to be told which knob to turn and that 429 retries can burn the budget.
chapter1/web-search-agent/tests/test_agent.py:306
Function
test_timeout_cancellation_closes_real_worker_context
()
chapter10/parallel-web-research/test_coordination.py:103
Method
test_timeout_ms_negative_like_omit
(self, system_state)
chapter5/coding-agent/tests/test_bash_tool.py:222
Method
test_timeout_ms_zero_like_omit
timeout=0 must not skip the command (DataLoss via immediate 0s deadline).
chapter5/coding-agent/tests/test_bash_tool.py:210
Method
test_timeout_parameter
Test timeout parameter (in milliseconds)
chapter5/coding-agent/tests/test_bash_tool.py:80
Method
test_times_out_without_leaving_a_blocked_read
(self)
chapter4/collaboration-tools/test_run_experiment_4_5.py:228
Function
test_timestamp_objective_is_derived_from_actions
(tmp_path: Path)
chapter2/system-hint/test_experiment_2_8.py:18
Method
test_todo_list_in_hint
Test that TODO list appears in system hint
chapter5/coding-agent/tests/test_integration.py:52
Method
test_todo_validation_invalid_status
Test validation rejects invalid status values
chapter5/coding-agent/tests/test_todo_write_tool.py:66
Method
test_todo_validation_missing_fields
Test validation rejects TODOs missing required fields
chapter5/coding-agent/tests/test_todo_write_tool.py:54
Method
test_todo_validation_non_dict_item
Test validation handles non-dict items in todos list gracefully.
chapter5/coding-agent/tests/test_todo_write_tool.py:136
Method
test_token_expiry_handling
Test that expired tokens are handled gracefully.
chapter9/browser-use-rpa/browser-use/tests/ci/test_sync_client_auth.py:789
Method
test_token_is_single_use_and_bound_to_operation
(self)
chapter9/harness-safety-gate/test_evolution.py:145
Method
test_token_nondeterministic
(self)
chapter9/harness-safety-gate/test_safety_policy_gate.py:169
Function
test_token_usage_object_attributes
()
tests/test_ch7_evaluate_multilingual.py:204
Function
test_token_usage_object_attributes
()
tests/test_ch8_evaluate_multilingual.py:204
Function
test_tokenize_preserves_apostrophe_contractions
()
chapter3/sparse-embedding/test_tokenize_apostrophes.py:5
Function
test_tokenizer_audit_covers_multiple_open_tokenizers
()
chapter8/exact-copy-sft/tests/test_copy_pipeline.py:46
Function
test_tokenizer_risk_clean_ascii_none
()
tests/test_ch8_sft_data_auditor.py:246
Function
test_tokenizer_risk_clean_ascii_none
()
tests/test_ch7_sft_data_auditor.py:246
Function
test_tokenizer_risk_curly_quotes
()
tests/test_ch8_sft_data_auditor.py:228
Function
test_tokenizer_risk_curly_quotes
()
tests/test_ch7_sft_data_auditor.py:228
Function
test_tokenizer_risk_zero_width_space_and_bom
()
tests/test_ch8_sft_data_auditor.py:236
Function
test_tokenizer_risk_zero_width_space_and_bom
()
tests/test_ch7_sft_data_auditor.py:236
← previous
next →
12,501–12,600 of 13,003, ranked by callers