MCPcopy Create free account

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

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

Functiontest_process_request_handles_null_response_body
Contract: process_request handles status 200 with None response without raising AttributeError.
tests/test_ch1_search_codegen_null_response.py:36
Methodtest_process_user_and_assistant_messages_with_url_shortening
Test URL shortening in both UserMessage and AssistantMessage.
chapter9/browser-use-rpa/browser-use/tests/ci/test_url_shortening.py:54
Functiontest_process_verifier_privacy_tolerates_null_content_assistant_messages
Contract: ProcessVerifier._privacy does not flag false positive privacy leak on content: None assistant messages.
tests/test_ch9_assistant_text_null_content.py:20
Functiontest_process_verifier_privacy_tolerates_null_content_assistant_messages
Contract: ProcessVerifier._privacy does not flag false positive privacy leak on content: None assistant messages.
tests/test_ch8_assistant_text_null_content.py:20
Functiontest_process_verifier_tolerates_invalid_container_types
Contract: ProcessVerifier returns valid DimensionResults when container fields are non-iterable non-dict types. Locks out TypeError when process_
chapter9/trajectory-verifier/test_verifier_null_fields.py:35
Functiontest_process_verifier_tolerates_null_fields
Contract: ProcessVerifier returns valid DimensionResults when optional container fields are None. Locks out AttributeError/TypeError when process
chapter9/trajectory-verifier/test_verifier_null_fields.py:14
Functiontest_productive_turn_classification
()
tests/test_ch6_cost_efficiency_analyzer.py:223
Functiontest_productive_turn_classification
()
tests/test_ch7_cost_efficiency_analyzer.py:223
Functiontest_progress_every_never_zero
()
chapter1/learning-from-experience/tests/test_rl_progress_small_episodes.py:4
Methodtest_prohibited_ignored_when_allowlist_present
When allowlist is set, prohibited list is ignored by design.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_watchdog_security2.py:377
Functiontest_promoted_chapter_index_maps_back_to_chapter_source
(tmp_path: Path)
tests/test_git_revision_dates.py:27
Functiontest_promoted_chapter_page_links_to_the_tracked_chapter_source
(tmp_path: Path)
tests/test_site_edit_urls.py:49
Methodtest_promotion
Test pawn promotion.
chapter4/collaboration-tools/test_chess_tools.py:461
Functiontest_prompt_contains_source_scale_examples_boundaries_and_veto
(monkeypatch)
chapter3/user-memory-evaluation/test_structured_rubric.py:72
Functiontest_prompt_contains_task_and_trajectory
()
chapter8/premature-completion-dpo/test_pipeline.py:98
Functiontest_prompt_factory_hits_exact_reference_token_count
()
chapter7/model-benchmark/test_campaign.py:72
Functiontest_proofreading_agent_json_array_returns_empty_dict
(monkeypatch)
chapter10/book-translation/tests/test_proofread_non_dict.py:16
Functiontest_proofreading_agent_valid_object
(monkeypatch)
chapter10/book-translation/tests/test_proofread_non_dict.py:36
Functiontest_properties_only_still_gets_object_type
()
chapter9/self-evolving-tools/test_normalize_schema_bare_object.py:30
Functiontest_prose_with_two_objects_returns_first
()
chapter5/video-edit/test_extract_json_adjacent.py:12
Functiontest_protected_examples_are_present
()
chapter8/curly-quote-sft/tests/test_curly_pipeline.py:37
Functiontest_protocol_coverage_detects_unmapped_acceptance_key
Adding an acceptance key to the protocol without a PROTOCOL_TO_GATE mapping must raise an assertion at run time.
chapter6/async-agent/test_real_experiment.py:75
Functiontest_protocol_coverage_mapping_is_complete_and_enforced
Every protocol acceptance key must map to at least one gate, and the coverage report must reflect gate pass/fail status correctly.
chapter6/async-agent/test_real_experiment.py:56
Functiontest_protocol_coverage_reflects_gate_failure
When a gate fails, the coverage entries that depend on it must report all_gates_passed=False.
chapter6/async-agent/test_real_experiment.py:89
Functiontest_protocol_covers_every_manuscript_category_and_mutation
()
chapter4/perception-tools/test_experiment_4_2.py:78
Functiontest_protocol_is_exact_book_contract
()
chapter4/active-tool-discovery/test_exact_experiment.py:23
Functiontest_protocol_is_exact_twelve_page_five_to_fifteen_minute_contract
()
chapter5/paper-to-video/test_campaign.py:7
Functiontest_protocol_is_valid_json_and_hashable
()
chapter2/local_llm_serving/test_run_experiment.py:39
Functiontest_protocol_pins_exact_manuscript_workflow
()
chapter2/agent-skills-ppt/test_official_validation.py:12
Functiontest_protocol_records_runtime_agnostic_acceptance_policy
()
chapter2/agent-skills-ppt/test_official_validation.py:20
Functiontest_provider_error_checkpoint_is_quarantined_with_compatibility_receipt
(tmp_path)
chapter10/generative-agents/tests/test_runner_helpers.py:161
Functiontest_provider_resolution_requires_a_key
()
chapter1/web-search-agent/tests/test_config.py:81
Functiontest_proxy_settings_pydantic_model
Test that ProxySettings as a Pydantic model is correctly converted to a dictionary when used.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_session_viewport_and_proxy.py:1
Functiontest_prune_archives_idle_and_contradicted
()
chapter9/ai-style-skill/test_pipeline.py:97
Functiontest_public_chapter_indexes_use_the_2_0_structure
()
tests/test_chapter_numbering_consistency.py:60
Functiontest_public_endpoint_remains_the_default
()
tests/test_ch1_learning_agent_kimi_base_url.py:62
Methodtest_pydantic_model_parameters
Test action that takes a pydantic model as first parameter
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:155
Methodtest_pydantic_vs_individual_params_consistency
Test that pydantic and individual parameter patterns produce consistent results
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:515
Functiontest_python3_is_normalized_before_syntax_verification
(monkeypatch)
chapter4/execution-tools/test_execution_tools.py:155
Functiontest_python_docker_command_uses_mount_syntax_for_windows_paths
(monkeypatch)
chapter4/execution-tools/test_code_interpreter_python_runtime.py:33
Functiontest_python_does_not_fall_back_when_docker_image_lacks_package
(monkeypatch)
chapter4/execution-tools/test_code_interpreter_python_runtime.py:112
Functiontest_python_falls_back_to_current_interpreter_when_docker_unavailable
(monkeypatch)
chapter4/execution-tools/test_code_interpreter_python_runtime.py:77
Methodtest_python_lint_check_failure
Test automatic lint checking for invalid Python file
chapter5/coding-agent/tests/test_write_tool.py:91
Methodtest_python_lint_check_success
Test automatic lint checking for valid Python file
chapter5/coding-agent/tests/test_write_tool.py:76
Functiontest_python_roundtrip_with_real_interpreter
(monkeypatch)
chapter4/execution-tools/test_bash_lookup.py:77
Functiontest_python_temp_directory_is_created_under_workspace
(monkeypatch)
chapter4/execution-tools/test_code_interpreter_python_runtime.py:154
Functiontest_q_learning_agent_train_empty_victories_snapshot
Ensure checkpoint victory_rate calculation does not raise ZeroDivisionError when recent is empty.
chapter1/learning-from-experience/tests/test_rl_agent_empty_victories.py:9
Functiontest_quality_audit_has_zero_errors
()
chapter8/curly-quote-sft/tests/test_curly_pipeline.py:46
Functiontest_quality_issue_dataclass_fields
()
tests/test_ch8_sft_data_auditor.py:358
Functiontest_quality_issue_dataclass_fields
()
tests/test_ch7_sft_data_auditor.py:358
Functiontest_quality_judge_tolerates_non_dict_payload_and_items
()
tests/test_ch8_llm_judge_non_dict_payload.py:23
Functiontest_quality_judge_tolerates_non_dict_payload_and_items
()
tests/test_ch9_llm_judge_non_dict_payload.py:23
Functiontest_quality_judge_tolerates_null_dimensions_array_and_non_dict_payload
Contract: OpenAIQualityJudge handles explicit JSON null dimensions array, non-dict payloads, null items, and invalid trajectories. Locks out Type
chapter9/trajectory-verifier/test_llm_judge_null_fields.py:55
Functiontest_quality_judge_tolerates_null_score_confidence_evidence
Contract: OpenAIQualityJudge coerces explicit JSON null score, confidence, and evidence fields to safe defaults. Locks out TypeError/ValueError w
chapter9/trajectory-verifier/test_llm_judge_null_fields.py:22
Functiontest_quality_response_rejects_bare_scores_without_audible_evidence
()
chapter6/controllable-tts/test_fish_s1.py:70
Functiontest_quality_score_decreases_with_errors
()
tests/test_ch8_sft_data_auditor.py:330
Functiontest_quality_score_decreases_with_errors
()
tests/test_ch7_sft_data_auditor.py:330
Functiontest_quality_score_error_prevents_perfect
()
tests/test_ch8_sft_data_auditor.py:339
Functiontest_quality_score_error_prevents_perfect
()
tests/test_ch7_sft_data_auditor.py:339
Functiontest_quality_score_perfect_for_clean_data
()
tests/test_ch8_sft_data_auditor.py:320
Functiontest_quality_score_perfect_for_clean_data
()
tests/test_ch7_sft_data_auditor.py:320
Functiontest_quality_score_zero_for_empty
()
tests/test_ch8_sft_data_auditor.py:325
Functiontest_quality_score_zero_for_empty
()
tests/test_ch7_sft_data_auditor.py:325
Functiontest_quarantine_preserves_non_receipt_suffix
(tmp_path)
chapter10/generative-agents/tests/test_runner_helpers.py:187
Methodtest_quota_failure_is_not_capability_rejection
(self)
chapter6/astra-async-steering/test_judging.py:73
Methodtest_quota_failure_is_not_capability_rejection
(self)
chapter6/astra-async-steering/validation/runs/exp6-14-20260905-formal/source/test_judging.py:73
Functiontest_quoted_experiment_figure_stays_inside_its_blockquote
()
tests/test_mkdocs_figure_captions.py:108
Methodtest_quoted_paths_with_spaces
Test handling paths with spaces using quotes
chapter5/coding-agent/tests/test_bash_tool.py:141
Functiontest_qwen_and_bailian_aliases_resolve_to_dashscope
(monkeypatch, alias)
tests/test_providers.py:152
Functiontest_qwen_json_and_native_event_token_parsing
()
chapter6/streaming-speech/test_streaming.py:7
Methodtest_qwen_split_characters_keep_nine_positions
(self)
chapter2/attention_visualization/test_token_labels.py:34
Methodtest_radio_button_clicking
Test that agent can click radio buttons by checking for secret message.
chapter9/browser-use-rpa/browser-use/tests/ci/test_radio_buttons.py:77
Functiontest_rag_agent_executes_real_tool_loop_shape_and_tracks_metrics
()
chapter7/user-memory-system-evaluation/test_experiment.py:112
Functiontest_random_stmt_one_person_returns_count
()
chapter5/code-for-logic/test_random_stmt_one_person.py:17
Functiontest_range_with_trailing_comma
()
chapter4/perception-tools/test_parse_page_range_trailing_comma.py:32
Functiontest_rate_limit_answer_says_it_is_a_rate_limit
()
chapter1/web-search-agent/tests/test_agent.py:321
Functiontest_rate_ramp_benchmark_custom_request_fn
()
tests/test_ch7_rate_ramp_benchmark.py:67
Functiontest_rate_ramp_benchmark_custom_request_fn
()
tests/test_ch6_rate_ramp_benchmark.py:67
Functiontest_rate_ramp_benchmark_default_run
()
tests/test_ch7_rate_ramp_benchmark.py:28
Functiontest_rate_ramp_benchmark_default_run
()
tests/test_ch6_rate_ramp_benchmark.py:28
Functiontest_rating_update_tie
Test rating update for a tie.
chapter7/elo-leaderboard/tests/test_elo.py:52
Functiontest_rating_update_win
Test rating update when model_a wins.
chapter7/elo-leaderboard/tests/test_elo.py:38
Functiontest_raw_report_parser_retains_exact_five_by_three_matrix
()
chapter8/continued-pretraining/validation/test_report_audit.py:23
Functiontest_react_plan_retains_real_raw_receipt_and_trace
()
chapter6/phone-agent/test_agent.py:70
Functiontest_react_rejects_an_empty_task_before_provider_call
()
chapter6/phone-agent/test_webrtc_app.py:45
Functiontest_reactions_fire
(store, writer_ctx)
chapter5/permission-embedded-data-objects/tests/test_core.py:109
Methodtest_read_file
Test reading file content with proper formatting.
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:324
Methodtest_read_file
Test reading a file.
chapter4/execution-tools/test_terminal_controller.py:130
Functiontest_read_file_rejects_invalid_line_arguments
Invalid schema inputs must not silently become a read from line one.
chapter2/system-hint/test_basic.py:173
Methodtest_read_multiline_file
Test reading multiline file.
chapter4/execution-tools/test_filesystem_enhanced.py:57
Methodtest_read_multiple_files
Test reading multiple files at once.
chapter4/execution-tools/test_filesystem_enhanced.py:79
Methodtest_read_multiple_files_with_errors
Test reading multiple files with some missing.
chapter4/execution-tools/test_filesystem_enhanced.py:97
Methodtest_read_nonexistent_file
Test reading non-existent file.
chapter4/execution-tools/test_filesystem_enhanced.py:69
Methodtest_read_text_file
Test reading a text file.
chapter4/execution-tools/test_filesystem_enhanced.py:44
Methodtest_reads_one_available_line
(self)
chapter4/collaboration-tools/test_run_experiment_4_5.py:218
Functiontest_real_adapter_routes_to_notification_tools
Regression: built-in channels route to real notification_tools adapters, not mocks. Verifies the adapter boundary: when use_mock_channels=False a
tests/test_ch4_notification_dispatcher.py:602
Functiontest_real_api_error_is_receipted_and_raises
()
chapter6/agent-with-event-trigger/test_unipile_mailbox_experiment.py:69
Functiontest_real_browser_webrtc_offer_answer_and_bidirectional_rtp
()
chapter10/autonomous-phone-registration/test_webrtc_channel.py:68
Functiontest_real_campaign_has_honest_category_statuses_and_exact_receipts
()
chapter4/perception-tools/test_real_experiment_4_2_evidence.py:18
Functiontest_real_cascade_evidence_has_one_broadcast_all_acks_and_no_leaks
()
chapter10/parallel-web-research/test_exp104_validation_evidence.py:17
← previousnext →12,001–12,100 of 13,003, ranked by callers