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_parser_accepts_cli_overrides
()
chapter1/web-search-agent/tests/test_main.py:24
Function
test_parser_defaults_to_interactive_kimi_mode
()
chapter1/web-search-agent/tests/test_main.py:12
Function
test_parser_retains_all_eight_cells_and_64_outputs
()
chapter8/MiniMind-pretrain/validation/test_vlm_training_report_audit.py:39
Function
test_parses_bare_list_of_turns
()
tests/test_ch6_cost_efficiency_analyzer.py:75
Function
test_parses_bare_list_of_turns
()
tests/test_ch7_cost_efficiency_analyzer.py:75
Method
test_parses_python_mapping_literal
(self)
chapter4/collaboration-tools/test_result_parsing.py:9
Function
test_parses_scenarios_trace_shape
()
tests/test_ch6_cost_efficiency_analyzer.py:68
Function
test_parses_scenarios_trace_shape
()
tests/test_ch7_cost_efficiency_analyzer.py:68
Function
test_parses_spans_key_dict
()
tests/test_ch6_cost_efficiency_analyzer.py:81
Function
test_parses_spans_key_dict
()
tests/test_ch7_cost_efficiency_analyzer.py:81
Function
test_parses_turns_key_dict
()
tests/test_ch6_cost_efficiency_analyzer.py:87
Function
test_parses_turns_key_dict
()
tests/test_ch7_cost_efficiency_analyzer.py:87
Method
test_partial_character_is_not_flushed_early
(self)
chapter2/attention_visualization/test_streaming.py:123
Function
test_partial_credit_on_a_core_dimension_is_not_task_success
()
chapter3/user-memory-evaluation/test_structured_rubric.py:53
Method
test_partial_summary_tolerates_missing_model_task_cell
(self)
chapter7/model-action-threshold/tests/test_experiment.py:77
Function
test_partial_token_usage_reasoning_estimation
()
tests/test_ch7_evaluate_multilingual.py:288
Function
test_partial_token_usage_reasoning_estimation
()
tests/test_ch8_evaluate_multilingual.py:288
Function
test_password_with_colon_redacted
()
chapter3/log-sanitization/tests/test_url_credential_colon_slash.py:12
Function
test_password_with_slash_redacted
()
chapter3/log-sanitization/tests/test_url_credential_colon_slash.py:5
Method
test_path_configuration
Test path configuration variables.
chapter9/browser-use-rpa/browser-use/tests/ci/test_config.py:73
Method
test_path_not_found
Test error when path doesn't exist
chapter5/coding-agent/tests/test_ls_tool.py:160
Function
test_path_traversal_detection
()
tests/test_ch8_safety_policy_gate.py:16
Function
test_path_traversal_detection
()
tests/test_ch9_safety_policy_gate.py:16
Function
test_pcm_wav_round_trip_is_exact
()
chapter6/phone-agent/test_speech.py:6
Method
test_pdf_file_handling
Test PDF file handling
chapter5/coding-agent/tests/test_read_tool.py:136
Method
test_pdf_parser_structure
Test PDF parser structure (without actual PDF)
chapter1/context/tests/test_agent.py:98
Function
test_pedo_evaluator_initialization
Test initializing PEDOSecurityEvaluator and registering custom types.
tests/test_ch5_pedo_live_security_eval.py:29
Function
test_pending_as_decision_string_rejected
Regression: 'pending' is reserved; submitting it as a decision must be rejected, not silently treated as timeout.
tests/test_ch4_notification_dispatcher.py:495
Method
test_pending_request_accepts_one_terminal_decision
(self)
chapter4/collaboration-tools/test_run_experiment_4_5.py:194
Function
test_per_query_analysis_structure
()
tests/test_ch3_retrieval_stage_evaluator.py:397
Function
test_per_turn_metrics_fields
()
tests/test_ch6_cost_efficiency_analyzer.py:125
Function
test_per_turn_metrics_fields
()
tests/test_ch7_cost_efficiency_analyzer.py:125
Function
test_percentile_and_workload_summary_include_output_attainment
()
chapter7/model-benchmark/test_campaign.py:171
Method
test_permission_denied
Test handling of permission errors
chapter5/coding-agent/tests/test_ls_tool.py:180
Function
test_permission_denied_on_read
(store, writer_ctx, anon_ctx)
chapter5/permission-embedded-data-objects/tests/test_core.py:63
Function
test_permission_denied_on_write
(store, writer_ctx, reader_ctx)
chapter5/permission-embedded-data-objects/tests/test_core.py:71
Function
test_persisted_acceptance_status_does_not_claim_unrun_human_audio
()
chapter10/voice-werewolf/test_exp106_validation_evidence.py:9
Function
test_persisted_evidence_is_redacted_and_does_not_overclaim_voice
()
chapter10/autonomous-phone-registration/test_exp103_validation_evidence.py:9
Method
test_persistent_shell_session
Test that shell session persists across commands
chapter5/coding-agent/tests/test_bash_tool.py:42
Function
test_pii_items_metric_excludes_rejected_and_malformed_items
(tmp_path)
chapter3/log-sanitization/tests/test_sanitize_conversation.py:112
Function
test_pipeline_catch_rate_mixed_prompt_ids
Verify pipeline_catch_rate excludes .benign prompt IDs but keeps undotted and non-benign IDs.
tests/test_ch5_pedo_metrics_undotted_prompt_id.py:40
Function
test_pipeline_catch_rate_with_undotted_prompt_ids
Verify pipeline_catch_rate works with prompt IDs lacking dot separators without raising IndexError.
tests/test_ch5_pedo_metrics_undotted_prompt_id.py:14
Function
test_placeholder_key_is_not_a_provider_name
The placeholder credential must not be mistakable for an identity. It was once the string ``"ollama"``, making ``backend.api_key`` equal to `
tests/test_providers.py:815
Function
test_plain_int_unchanged
(tmp_path)
chapter7/public-health-reporting-eval/tests/test_excel_float_int.py:67
Function
test_plain_integer_unchanged
()
chapter8/Intuitor/tests/test_normalize_frac.py:18
Function
test_plain_property_map_still_wrapped
()
chapter9/self-evolving-tools/test_normalize_schema_bare_object.py:37
Function
test_plain_slash_six_over_two
()
chapter8/Intuitor/tests/test_normalize_frac.py:10
Function
test_plan_grading_requires_both_cross_domain_slots
()
chapter4/active-tool-discovery/test_exact_experiment.py:37
Function
test_plan_shards_stays_sequential_for_a_small_catch_up
()
tests/test_gen_star_history_iso_formats.py:139
Function
test_plan_shards_tiles_the_range_without_gaps_or_overlap
Contract: shard boundaries chain end-to-end so every star is fetched exactly once.
tests/test_gen_star_history_iso_formats.py:123
Method
test_polarity_contradiction_detected
Claim X then claim not-X is a polarity contradiction.
tests/test_ch8_trajectory_consistency_checker.py:97
Method
test_polarity_contradiction_detected
Claim X then claim not-X is a polarity contradiction.
tests/test_ch9_trajectory_consistency_checker.py:97
Method
test_poll_for_token_pending
Test polling when authorization is pending.
chapter9/browser-use-rpa/browser-use/tests/ci/test_sync_client_auth.py:151
Method
test_poll_for_token_success
Test successful token polling.
chapter9/browser-use-rpa/browser-use/tests/ci/test_sync_client_auth.py:171
Function
test_position_balanced_aggregate_maps_aliases_back_to_configurations
()
chapter6/controllable-tts/test_fish_s1.py:77
Function
test_positive_count_still_returns_recent
(tc)
chapter4/execution-tools/test_command_history_count_zero.py:26
Function
test_positive_history_limit_still_keeps_tail
()
chapter3/contextual-retrieval/test_history_limit_zero.py:24
Function
test_positive_history_limit_still_keeps_tail
()
chapter3/agentic-rag/test_history_limit_zero.py:25
Function
test_positive_interval_still_accepted
()
chapter4/collaboration-tools/test_recurring_interval_positive.py:34
Function
test_positive_limit_still_returns_lines
(system_state, temp_dir)
chapter5/coding-agent/tests/test_read_limit_zero.py:29
Function
test_positive_limit_still_returns_recent
(tmp_path, monkeypatch)
chapter3/user-memory/test_recent_turns_limit_zero.py:23
Function
test_positive_provider_usage_ignores_nested_token_details
()
chapter10/generative-agents/tests/test_validate_campaign.py:10
Function
test_positive_slowmo_factor_kept
()
chapter5/video-edit/test_slowmo_null_factor.py:23
Function
test_postgres_cascade_rolls_back_then_success_publishes_committed_state
Exercise PostgreSQL JSONB, aborted transactions, and post-commit visibility.
tests/test_ch5_pedo_atomic_delete.py:214
Function
test_postgres_empty_user_password_redacted
()
chapter3/log-sanitization/tests/test_url_credential_empty_user.py:12
Method
test_power_and_mod
(self)
chapter1/context/tests/test_calc_sandbox.py:33
Method
test_powershell_protocol_quotes_windows_working_directory
(self)
chapter5/coding-agent/tests/test_shell_session.py:73
Method
test_precedence_and_parentheses
(self)
chapter1/context/tests/test_calc_sandbox.py:29
Function
test_precision_at_k_basic
()
tests/test_ch3_retrieval_stage_evaluator.py:50
Function
test_precision_at_k_k_larger_than_list
()
tests/test_ch3_retrieval_stage_evaluator.py:68
Function
test_precision_at_k_perfect_and_empty
()
tests/test_ch3_retrieval_stage_evaluator.py:59
Function
test_precision_bounds_with_repeated_words
Verify precision score is bounded <= 1.0 even when text contains repeated query terms.
tests/test_ch3_hybrid_structured_retriever.py:217
Function
test_precision_calculation_unique_matched_words
Verify precision calculation counts unique matched query terms rather than token frequencies.
chapter3/structured-index/test_hybrid_retriever.py:26
Method
test_predicates_survive_serialization
(self)
chapter9/browser-use-rpa/test_state_predicates.py:37
Method
test_prefix_keeps_complete_text_before_incomplete_char
(self)
chapter2/attention_visualization/test_token_labels.py:87
Function
test_prefix_proxy_is_stable_for_skills_and_changes_between_transfer_roles
()
chapter10/multi-role-transfer/tests/test_skill_comparison.py:77
Function
test_prefix_scorer_rejects_applying_scoped_paper_memory_to_x
()
chapter7/user-memory-policy-eval/test_runner.py:26
Function
test_preflight_never_claims_ready_without_real_hardware
(monkeypatch)
chapter7/openvla-robotwin2-eval/test_experiment.py:85
Function
test_prepare_animation_data_string_date
prepare_animation_data must handle string dates without raising AttributeError.
chapter7/elo-leaderboard/tests/test_ch6_animation_string_date.py:6
Method
test_preserve_indentation
Test that indentation is preserved
chapter5/coding-agent/tests/test_edit_tool.py:93
Method
test_preserves_type_annotations
Generated model should preserve type annotations
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:790
Function
test_pricing_coverage_recovers_schema1_fixed_query_usd
()
chapter7/user-memory-system-evaluation/test_experiment.py:357
Function
test_pricing_requires_dated_source_and_three_letter_currency
()
chapter7/user-memory-system-evaluation/test_experiment.py:280
Function
test_primary_provider_is_preserved_when_its_key_exists
()
chapter1/web-search-agent/tests/test_config.py:43
Function
test_prior_multiturn_history_is_preserved_in_order
()
chapter5/agent-creator/reference_agent/tests/test_contract.py:60
Method
test_prior_tool_success_grounds_a_later_claim
A completed action is valid evidence for a subsequent success claim.
chapter9/trajectory-verifier/test_claim_action_order.py:52
Function
test_privacy_markers_exclude_public_form_options_but_include_private_values
()
chapter10/autonomous-phone-registration/test_webrtc_channel.py:58
Function
test_private_credential_failure_is_blocked_and_never_passed
()
chapter4/perception-tools/test_experiment_4_2.py:100
Function
test_privilege_escalation_prevention
Test detecting and blocking privilege escalation attempts.
tests/test_ch5_pedo_live_security_eval.py:126
Function
test_probe_duration_na
ffprobe 输出 N/A(无时长元数据)→ 清晰的 RuntimeError,而非 ValueError。
chapter5/video-edit/test_agents_llm_json.py:52
Function
test_probe_duration_normal
(monkeypatch)
chapter5/video-edit/test_agents_llm_json.py:60
Function
test_process_audio_chunk_barge_in_active_playback
Verify process_audio_chunk triggers instant barge-in during active TTS playback.
tests/test_ch6_interruption_manager.py:65
Function
test_process_audio_chunk_barge_in_active_playback
Verify process_audio_chunk triggers instant barge-in during active TTS playback.
tests/test_ch9_interruption_manager.py:65
Function
test_process_audio_chunk_consecutive_frames_speech_flag
Verify is_speech remains True when consecutive frames condition is pending.
tests/test_ch6_interruption_manager.py:159
Function
test_process_audio_chunk_consecutive_frames_speech_flag
Verify is_speech remains True when consecutive frames condition is pending.
tests/test_ch9_interruption_manager.py:159
Function
test_process_audio_chunk_inactive_playback
Verify process_audio_chunk does not trigger barge-in when TTS playback is inactive.
tests/test_ch6_interruption_manager.py:52
Function
test_process_audio_chunk_inactive_playback
Verify process_audio_chunk does not trigger barge-in when TTS playback is inactive.
tests/test_ch9_interruption_manager.py:52
Method
test_process_input_messages_with_url_shortening
Test that long URLs in input messages are shortened and mappings stored.
chapter9/browser-use-rpa/browser-use/tests/ci/test_url_shortening.py:34
Method
test_process_native_gemini
Test native Gemini processing
chapter4/multimodal-agent/test_multimodal.py:160
Method
test_process_output_with_custom_actions_and_url_restoration
Test that shortened URLs in AgentOutput with custom actions are restored.
chapter9/browser-use-rpa/browser-use/tests/ci/test_url_shortening.py:84
← previous
next →
11,901–12,000 of 13,003, ranked by callers