MCPcopy Create free account

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

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

Functiontest_bm25_calculate_raw_idf_n_less_than_df
Prove that calculate_raw_idf when total_documents N < df does not raise math domain error.
tests/test_ch3_bm25_zero_avgdl.py:24
Functiontest_bm25_calculate_term_score_zero_avgdl
Prove that calculating term score when avgdl is 0 handles division by zero safely.
tests/test_ch3_bm25_zero_avgdl.py:11
Functiontest_bm25_search_empty_term_in_query_terms_no_index_error
()
chapter3/sparse-embedding/test_bm25_empty_term.py:5
Functiontest_book_build_metadata_uses_v2_0_everywhere
()
tests/test_chapter_numbering_consistency.py:90
Functiontest_book_main_case_text
()
chapter1/image-gen-workflow/tests/test_requirements.py:24
Methodtest_boolean_env_vars
Test boolean environment variables are parsed correctly.
chapter9/browser-use-rpa/browser-use/tests/ci/test_config.py:33
Functiontest_bootstrap_is_reproducible
()
chapter7/elo-leaderboard/tests/test_bootstrap_reproducibility.py:5
Functiontest_both_categories_present
()
chapter1/image-gen-workflow/tests/test_requirements.py:12
Functiontest_boundary_evaluator_catches_forbidden_tool_and_leak
()
chapter10/multi-role-transfer/tests/test_skill_comparison.py:61
Functiontest_boundary_gap_clustered_lengths
()
tests/test_ch8_sft_data_auditor.py:255
Functiontest_boundary_gap_clustered_lengths
()
tests/test_ch7_sft_data_auditor.py:255
Functiontest_boundary_gap_diverse_lengths_none
()
tests/test_ch8_sft_data_auditor.py:264
Functiontest_boundary_gap_diverse_lengths_none
()
tests/test_ch7_sft_data_auditor.py:264
Functiontest_box_mesh_has_no_holes
()
chapter5/cad-vs-diffusion/test_offline.py:42
Functiontest_boxed_deeper_nesting
()
chapter8/Intuitor/tests/test_boxed_nested_braces.py:16
Functiontest_boxed_negative_dollar_amount
()
chapter8/Intuitor/test_normalize_negative_currency.py:15
Functiontest_boxed_nested_frac
()
chapter8/Intuitor/tests/test_boxed_nested_braces.py:6
Functiontest_boxed_simple_integer
()
chapter8/Intuitor/tests/test_boxed_nested_braces.py:11
Functiontest_browser_code_has_no_semantic_text_or_browser_speech_bypass
()
chapter6/phone-agent/test_webrtc_app.py:51
Functiontest_browser_list_tabs_awaits_title
()
chapter4/collaboration-tools/test_browser_title.py:26
Functiontest_browser_navigate_awaits_title
()
chapter4/collaboration-tools/test_browser_title.py:11
Functiontest_browser_process_kill_detection
Test that killing the browser process is detected.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_watchdog_crash.py:283
Methodtest_browser_session_cloud_browser_logic
Test that cloud browser profile settings work correctly.
chapter9/browser-use-rpa/browser-use/tests/ci/test_cloud_browser.py:238
Methodtest_browser_session_double_kwarg
Run the test to diagnose browser_session parameter issue This test demonstrates the problem and our fix. The issue happens because: 1. In tools/
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:874
Functiontest_browser_use_download_with_http_server
Test browser-use download with HTTP server and event coordination
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_watchdog_downloads_simple.py:30
Functiontest_build_parser_survives_malformed_env
(monkeypatch)
chapter6/agent-with-event-trigger/tests/test_env_int.py:33
Functiontest_build_series_handles_fractional_and_timezone_iso_strings
Contract: stargazers with fractional seconds and explicit tz offsets are charted without ValueError.
tests/test_gen_star_history_iso_formats.py:48
Functiontest_build_series_starts_from_the_stars_predating_the_chart
Contract: stars from before the start date are the curve's baseline, not a jump at the edge.
tests/test_gen_star_history_iso_formats.py:74
Methodtest_builtins_open_bypass_is_confined_to_container
(self)
chapter9/self-modifying-agent/test_evolution.py:111
Functiontest_bulk_ingest_objects_and_dicts
Verify index_raptor_nodes and index_graphrag_data accept lists of dicts or objects.
tests/test_ch3_hybrid_structured_retriever.py:118
Methodtest_byte_level_space_markers_still_map_to_the_space_glyph
(self)
chapter2/attention_visualization/test_visualization.py:36
Functiontest_bytearray_and_memoryview_energy
Verify bytearray and memoryview inputs are handled cleanly in energy calculation.
tests/test_ch6_interruption_manager.py:208
Functiontest_bytearray_and_memoryview_energy
Verify bytearray and memoryview inputs are handled cleanly in energy calculation.
tests/test_ch9_interruption_manager.py:208
Functiontest_cache_dict_same_repr_keys_is_order_independent
Equal dictionaries deduplicate even when the key sort identities collide.
chapter2/prompt-engineering/test_hash_item_dict_collision.py:63
Functiontest_cache_distinguishes_nan_dictionary_keys
Unequal NaN keys with identical text must not share cached results.
chapter2/prompt-engineering/test_hash_item_dict_collision.py:129
Functiontest_cache_distinguishes_same_named_function_instances
Distinct same-named callables must never share cached results.
chapter2/prompt-engineering/test_hash_item_dict_collision.py:113
Functiontest_cache_node_embeddings
Verify that node embeddings computed via embedding_fn are cached in node['embedding'].
chapter3/structured-index/test_hybrid_retriever.py:73
Functiontest_cached_json_call_retries_and_preserves_malformed_receipt
(tmp_path)
chapter5/paper-to-video/test_campaign.py:36
Functiontest_cached_turn_classification
()
tests/test_ch6_cost_efficiency_analyzer.py:239
Functiontest_cached_turn_classification
()
tests/test_ch7_cost_efficiency_analyzer.py:239
Functiontest_calculate_backoff_curves_missing_fields
()
tests/test_ch7_rate_ramp_benchmark.py:128
Functiontest_calculate_backoff_curves_missing_fields
()
tests/test_ch6_rate_ramp_benchmark.py:128
Functiontest_calculate_energy_integer_normalization
Verify integer arrays and lists are properly normalized to avoid false barge-in.
tests/test_ch6_interruption_manager.py:142
Functiontest_calculate_energy_integer_normalization
Verify integer arrays and lists are properly normalized to avoid false barge-in.
tests/test_ch9_interruption_manager.py:142
Functiontest_calculate_energy_low_amplitude_int_list
Verify low-amplitude integer lists do not produce false high energy values.
tests/test_ch6_interruption_manager.py:45
Functiontest_calculate_energy_low_amplitude_int_list
Verify low-amplitude integer lists do not produce false high energy values.
tests/test_ch9_interruption_manager.py:45
Functiontest_calculate_energy_silence_vs_speech
Verify calculate_energy correctly distinguishes silence from speech across formats.
tests/test_ch6_interruption_manager.py:29
Functiontest_calculate_energy_silence_vs_speech
Verify calculate_energy correctly distinguishes silence from speech across formats.
tests/test_ch9_interruption_manager.py:29
Functiontest_calculate_percentile
()
tests/test_ch7_rate_ramp_benchmark.py:18
Functiontest_calculate_percentile
()
tests/test_ch6_rate_ramp_benchmark.py:18
Methodtest_calculator
Test calculator tool
chapter1/context/tests/test_agent.py:16
Methodtest_calibration_matches_experts
(self)
chapter9/trajectory-verifier/test_verifier.py:28
Functiontest_calibration_rejects_missing_gold_or_bad_judge
()
chapter9/ai-style-skill/test_pipeline.py:137
Methodtest_calibration_report_supports_dimension_result_objects
Contract: calibration_report handles report dimensions containing DimensionResult objects. Locks out TypeError when report dimensions are Dim
chapter9/trajectory-verifier/test_calibration_report_dimension_result.py:8
Functiontest_calibration_uses_external_labels_linked_by_feedback_source
()
chapter9/ai-style-skill/test_pipeline.py:110
Functiontest_campaign_binding_rejects_changed_execution_but_allows_repricing
(tmp_path: Path)
chapter7/model-benchmark/test_campaign.py:108
Functiontest_campaign_completion_requires_both_full_real_arms
()
chapter5/code-for-logic/test_statistics.py:16
Functiontest_campaign_sizes_and_id_disjointness
()
chapter8/exact-copy-sft/tests/test_copy_pipeline.py:15
Functiontest_campaign_sizes_and_id_disjointness
()
chapter8/curly-quote-sft/tests/test_curly_pipeline.py:15
Functiontest_cancel_all_before_workers_start
()
chapter6/async-agent/test_real_tasks.py:85
Functiontest_cancel_terminates_real_child_process_and_freezes_progress
(monkeypatch)
chapter6/async-agent/test_real_tasks.py:57
Methodtest_candidate_classifier_matches_reference
(self)
chapter9/harness-safety-gate/test_evolution.py:115
Methodtest_candidate_exception_is_rejected_without_crashing
(self)
chapter9/self-modifying-agent/test_evolution.py:85
Methodtest_candidate_has_no_network_access
(self)
chapter9/self-modifying-agent/test_evolution.py:134
Functiontest_candidate_lifecycle
Test the full candidate lifecycle through the state machine.
chapter5/permission-embedded-data-objects/tests/test_scenarios.py:52
Methodtest_candidate_must_pass_reset_replay_before_storage
(self)
chapter9/browser-use-rpa/test_state_predicates.py:15
Methodtest_candidate_passes_all_gates
(self)
chapter9/harness-safety-gate/test_evolution.py:111
Methodtest_candidate_stops_permanent_error_and_keeps_temporary_retry
(self)
chapter9/self-modifying-agent/test_evolution.py:30
Functiontest_canonical_answer_rubric_rejects_refusal_and_hallucinated_markup
()
chapter1/context/test_experiment_1_1.py:90
Functiontest_canonical_evidence_latest_pointer_and_all_declared_hashes_match
()
chapter10/book-translation/test_official_experiment.py:191
Functiontest_canonical_evidence_passes_fail_closed_validator
()
chapter8/MiniMind-pretrain/validation/test_training_report_audit.py:89
Functiontest_canonical_evidence_passes_fail_closed_validator
()
chapter8/MiniMind-pretrain/validation/test_vlm_training_report_audit.py:80
Functiontest_canonical_evidence_validates
()
chapter8/continued-pretraining/validation/test_report_audit.py:50
Functiontest_canonical_manifest_is_hash_complete
()
chapter7/elo-leaderboard/tests/test_validation_runner.py:5
Functiontest_canonical_nav_labels_multiple_colons_and_escaped_quotes
Prove that quoted nav labels with multiple colons and escaped quotes are properly parsed.
tests/test_site_i18n.py:47
Functiontest_canonical_nav_labels_preserves_colons_in_quoted_strings
Prove that double-quoted and single-quoted nav labels containing colons (e.g., "第1章: Agent基础知识", 'Chapter 2: Context Engineering') are preserved
tests/test_site_i18n.py:9
Functiontest_canonical_nav_labels_unquoted
Prove that unquoted nav labels without colons are correctly parsed and appended, locking out missing nav entry errors.
tests/test_site_i18n.py:32
Functiontest_canonical_real_coding_agent_evidence_closes_all_gates
()
chapter9/self-modifying-agent/test_real_evidence.py:9
Functiontest_canonical_repeated_real_model_campaign_closes_all_gates
()
chapter9/self-evolution-eval/test_real_campaign_evidence.py:9
Functiontest_caption_reuses_python_markdowns_escaped_alt_text
()
tests/test_mkdocs_figure_captions.py:82
Functiontest_card_builder_retries_parse_and_schema_failures_without_weakening_schema
()
chapter7/user-memory-system-evaluation/test_experiment.py:193
Methodtest_caret_is_power_rewrite
(self)
chapter1/context/tests/test_calc_sandbox.py:37
Functiontest_case_audit_requires_matching_tool_protocol_history_usage_and_evidence
()
chapter5/agent-creator/test_creator.py:294
Methodtest_case_insensitive_prohibited_domains
Prohibited domain matching should be case-insensitive.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_watchdog_security2.py:422
Methodtest_case_insensitive_search
Test -i flag for case insensitive search
chapter5/coding-agent/tests/test_grep_tool.py:26
Functiontest_case_manifest_validation
(tmp_path)
chapter6/end-to-end-speech/tests/test_demo.py:12
Methodtest_castling
Test castling moves.
chapter4/collaboration-tools/test_chess_tools.py:423
Functiontest_catalog_gate_requires_v2_sdk_and_current_protocol
()
chapter4/perception-tools/test_experiment_4_2.py:61
Functiontest_catalog_has_126_unique_complete_schemas_over_50k_tokens
()
chapter4/perception-tools/test_expanded_catalog.py:25
Functiontest_cdp_proxy_auth_handler_registers_and_responds
()
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_session_proxy.py:26
Methodtest_cell_not_found
Test error when cell_id doesn't exist
chapter5/coding-agent/tests/test_notebook_edit_tool.py:163
Methodtest_change_cell_type
Test changing cell type during replace
chapter5/coding-agent/tests/test_notebook_edit_tool.py:124
Functiontest_change_date_matches_successful_result
(claimed_date, verdict)
tests/test_ch9_factual_grounding.py:83
Methodtest_change_directory
Test changing directory.
chapter4/execution-tools/test_terminal_controller.py:73
Methodtest_change_to_nonexistent
Test changing to nonexistent directory.
chapter4/execution-tools/test_terminal_controller.py:101
Functiontest_channel_config_passed_to_real_adapter
Regression: channel_config values are forwarded to the real adapter. Verifies that config like chat_id, webhook_url, and to_email are passed
tests/test_ch4_notification_dispatcher.py:636
Functiontest_channel_exception_does_not_kill_dispatch_all
Regression: a single channel raising must not abort the entire dispatch_all batch.
tests/test_ch4_notification_dispatcher.py:513
Functiontest_chapter9_answers_cover_each_completed_translation
()
tests/test_reference_answer_coverage.py:26
Functiontest_chapter_1_localized_figures_match_their_captions
()
tests/test_i18n_figure_placement.py:78
Functiontest_chapter_3_english_figures_match_their_captions
()
tests/test_ch3_english_figures.py:43
← previousnext →10,301–10,400 of 13,003, ranked by callers