Test files: 12. Test functions: 129. Described by their authors (docstring or @DisplayName): 2. Where there is no description, the line shows the test name in words and says so.
Latest result: ragleap-tools-tests passed 133 passed, 0 skipped, 0 failed CI job
test_calculator.py — 12 tests 12 passed, 0 failed, 0 skipped
No file-level description in the source.
test_basic_arithmeticpassed
Basic arithmetic (no description in the source; shown from the name)test_functions_and_constantspassed
Functions and constants (no description in the source; shown from the name)test_division_by_zeropassed
Division by zero (no description in the source; shown from the name)test_empty_expressionpassed
Empty expression (no description in the source; shown from the name)test_expression_too_longpassed
Expression too long (no description in the source; shown from the name)test_rejects_import_callpassed
Rejects import call (no description in the source; shown from the name)test_rejects_attribute_accesspassed
Rejects attribute access (no description in the source; shown from the name)test_rejects_arbitrary_namespassed
Rejects arbitrary names (no description in the source; shown from the name)test_rejects_list_comprehensionpassed
Rejects list comprehension (no description in the source; shown from the name)test_rejects_multi_statementpassed
Rejects multi statement (no description in the source; shown from the name)test_tool_schema_shapepassed
Tool schema shape (no description in the source; shown from the name)test_tool_call_matches_direct_callpassed
Tool call matches direct call (no description in the source; shown from the name)
test_datetime_tools.py — 5 tests 5 passed, 0 failed, 0 skipped
No file-level description in the source.
test_get_current_datetime_succeedspassed
Get current datetime succeeds (no description in the source; shown from the name)test_add_dayspassed
Add days (no description in the source; shown from the name)test_subtract_via_negativepassed
Subtract via negative (no description in the source; shown from the name)test_date_differencepassed
Date difference (no description in the source; shown from the name)test_invalid_datetime_stringpassed
Invalid datetime string (no description in the source; shown from the name)
test_file_ops.py — 11 tests 11 passed, 0 failed, 0 skipped
No file-level description in the source.
test_write_then_readpassed
Write then read (no description in the source; shown from the name)test_write_creates_parent_dirspassed
Write creates parent dirs (no description in the source; shown from the name)test_read_nonexistent_filepassed
Read nonexistent file (no description in the source; shown from the name)test_read_directory_as_file_failspassed
Read directory as file fails (no description in the source; shown from the name)test_path_escape_rejected_on_readpassed
Path escape rejected on read (no description in the source; shown from the name)test_path_escape_rejected_on_writepassed
Path escape rejected on write (no description in the source; shown from the name)test_symlink_escape_rejectedpassed
Symlink escape rejected (no description in the source; shown from the name)test_list_filespassed
List files (no description in the source; shown from the name)test_list_files_shows_subdirs_with_trailing_slashpassed
List files shows subdirs with trailing slash (no description in the source; shown from the name)test_write_content_too_largepassed
Write content too large (no description in the source; shown from the name)test_make_file_tools_returns_three_bound_toolspassed
Make file tools returns three bound tools (no description in the source; shown from the name)
test_github_search.py — 14 tests 14 passed, 0 failed, 0 skipped
Tests for ragleap_tools.github_search - GitHubSearchConfig, search_github_repositories(), and make_github_search_tool(). Mocks urllib.request.urlopen directly so the real URL/header construction is exercised, mirroring test_web_search.py's approach for the two SearchProvider implementations.
test_returns_normalized_resultspassed
Returns normalized results (no description in the source; shown from the name)test_handles_missing_description_and_languagepassed
Handles missing description and language (no description in the source; shown from the name)test_no_token_sends_no_authorization_headerpassed
No token sends no authorization header (no description in the source; shown from the name)test_token_sends_bearer_authorization_headerpassed
Token sends bearer authorization header (no description in the source; shown from the name)test_always_sends_user_agentpassed
Always sends user agent (no description in the source; shown from the name)test_builds_correct_query_paramspassed
Builds correct query params (no description in the source; shown from the name)test_omits_sort_param_when_not_givenpassed
Omits sort param when not given (no description in the source; shown from the name)test_clamps_num_results_to_maximumpassed
Clamps num results to maximum (no description in the source; shown from the name)test_rejects_non_integer_num_results_without_making_requestpassed
Rejects non integer num results without making request (no description in the source; shown from the name)test_http_error_surfaces_status_and_bodypassed
Http error surfaces status and body (no description in the source; shown from the name)test_network_error_is_caughtpassed
Network error is caught (no description in the source; shown from the name)test_make_tool_returns_bound_toolpassed
Make tool returns bound tool (no description in the source; shown from the name)test_make_tool_has_valid_openai_schemapassed
Make tool has valid openai schema (no description in the source; shown from the name)test_make_tool_has_valid_gemini_schemapassed
Make tool has valid gemini schema (no description in the source; shown from the name)
test_ingest.py — 6 tests 6 passed, 0 failed, 0 skipped
Tests for ragleap_tools.ingest - ingest_document() and make_ingest_tool(). Uses a fake RagLeap stand-in rather than a real instance, same approach as test_search.py: ingest_text()'s own correctness is ragleap-rag's job (already tested there); this module's job is the Tool/ToolResult wiring and the metadata threading around it, which a fake exercises just as well without a live vector backend or embedding provider.
test_ingest_document_passes_filename_as_metadatapassed
The real bug this fix closes: metadata was never threadedtest_ingest_document_returns_document_id_and_chunks_storedpassed
Ingest document returns document id and chunks stored (no description in the source; shown from the name)test_ingest_document_catches_value_errorpassed
Ingest document catches value error (no description in the source; shown from the name)test_make_ingest_tool_returns_bound_toolpassed
Make ingest tool returns bound tool (no description in the source; shown from the name)test_make_ingest_tool_has_valid_openai_schemapassed
Make ingest tool has valid openai schema (no description in the source; shown from the name)test_make_ingest_tool_has_valid_gemini_schemapassed
Make ingest tool has valid gemini schema (no description in the source; shown from the name)
test_json_csv.py — 4 tests 4 passed, 0 failed, 0 skipped
No file-level description in the source.
test_parse_valid_jsonpassed
Parse valid json (no description in the source; shown from the name)test_parse_invalid_jsonpassed
Parse invalid json (no description in the source; shown from the name)test_parse_csv_with_headerpassed
Parse csv with header (no description in the source; shown from the name)test_parse_csv_without_headerpassed
Parse csv without header (no description in the source; shown from the name)
test_public_api.py — 6 tests 6 passed, 0 failed, 0 skipped
Tests for the package's public __init__.py surface - the actual API a real caller interacts with, not just individual modules.
test_version_is_exposedpassed
Version is exposed (no description in the source; shown from the name)test_stateless_tools_all_have_valid_openai_schemaspassed
Stateless tools all have valid openai schemas (no description in the source; shown from the name)test_stateless_tools_all_have_valid_gemini_schemaspassed
Stateless tools all have valid gemini schemas (no description in the source; shown from the name)test_stateless_tool_names_are_uniquepassed
Stateless tool names are unique (no description in the source; shown from the name)test_web_search_names_are_exportedpassed
Web search names are exported (no description in the source; shown from the name)test_github_search_names_are_exportedpassed
Github search names are exported (no description in the source; shown from the name)
test_search.py — 12 tests 12 passed, 0 failed, 0 skipped
Tests for ragleap_tools.search - search_documents() and make_search_tool(). Uses a fake RagLeap stand-in rather than a real instance: retrieve()'s own correctness is ragleap-rag's job (already tested there); this module's job is the Tool/ToolResult wiring around it, which a fake exercises just as well without a live vector backend.
test_search_documents_returns_chunks_unmodifiedpassed
Search documents returns chunks unmodified (no description in the source; shown from the name)test_search_documents_passes_through_top_k_and_rerankpassed
Search documents passes through top k and rerank (no description in the source; shown from the name)test_search_documents_always_uses_hybrid_retrievalpassed
Search documents always uses hybrid retrieval (no description in the source; shown from the name)test_search_documents_returns_empty_result_for_no_matchespassed
Search documents returns empty result for no matches (no description in the source; shown from the name)test_search_documents_catches_unexpected_errorspassed
Search documents catches unexpected errors (no description in the source; shown from the name)test_make_search_tool_returns_bound_toolpassed
Make search tool returns bound tool (no description in the source; shown from the name)test_make_search_tool_has_valid_openai_schemapassed
Make search tool has valid openai schema (no description in the source; shown from the name)test_make_search_tool_has_valid_gemini_schemapassed
Make search tool has valid gemini schema (no description in the source; shown from the name)test_search_documents_passes_filename_as_metadata_filterpassed
Search documents passes filename as metadata filter (no description in the source; shown from the name)test_search_documents_without_filename_passes_no_metadata_filterpassed
Confirms the default (no filename=) path is unchanged - thetest_make_search_tool_schema_includes_optional_filenamepassed
Make search tool schema includes optional filename (no description in the source; shown from the name)test_make_search_tool_call_with_filename_passes_throughpassed
Make search tool call with filename passes through (no description in the source; shown from the name)
test_text_utils.py — 5 tests 5 passed, 0 failed, 0 skipped
No file-level description in the source.
test_regex_extractpassed
Regex extract (no description in the source; shown from the name)test_regex_extract_invalid_patternpassed
Regex extract invalid pattern (no description in the source; shown from the name)test_word_countpassed
Word count (no description in the source; shown from the name)test_case_transformspassed
Case transforms (no description in the source; shown from the name)test_unknown_mode_rejectedpassed
Unknown mode rejected (no description in the source; shown from the name)
test_unit_conversion.py — 6 tests 6 passed, 0 failed, 0 skipped
No file-level description in the source.
test_length_km_to_milespassed
Length km to miles (no description in the source; shown from the name)test_length_unknown_unitpassed
Length unknown unit (no description in the source; shown from the name)test_weight_kg_to_lbpassed
Weight kg to lb (no description in the source; shown from the name)test_temperature_c_to_fpassed
Temperature c to f (no description in the source; shown from the name)test_temperature_f_to_cpassed
Temperature f to c (no description in the source; shown from the name)test_temperature_below_absolute_zero_rejectedpassed
Temperature below absolute zero rejected (no description in the source; shown from the name)
test_vision.py — 33 tests 33 passed, 0 failed, 0 skipped
Tests for ragleap_tools.vision - image-type detection, the describe_image() validation order, the two reference providers, and make_vision_tool(). A FakeVisionProvider records every call so tests assert on what was actually passed through (and that rejected inputs never reach the provider); urllib.request.urlopen is mocked directly for the provider tests so each provider's real URL/header/body construction is exercised, not bypassed.
test_detect_mime_type_known_formatspassed
Detect mime type known formats (no description in the source; shown from the name)test_detect_mime_type_unknown_and_shortpassed
Detect mime type unknown and short (no description in the source; shown from the name)test_describe_image_success_passes_bytes_type_and_default_promptpassed
Describe image success passes bytes type and default prompt (no description in the source; shown from the name)test_describe_image_passes_custom_prompt_throughpassed
Describe image passes custom prompt through (no description in the source; shown from the name)test_blank_prompt_falls_back_to_defaultpassed
Blank prompt falls back to default (no description in the source; shown from the name)test_type_is_detected_from_bytes_not_extensionpassed
Type is detected from bytes not extension (no description in the source; shown from the name)test_description_is_strippedpassed
Description is stripped (no description in the source; shown from the name)test_prompt_too_long_rejectedpassed
Prompt too long rejected (no description in the source; shown from the name)test_non_string_prompt_rejectedpassed
Non string prompt rejected (no description in the source; shown from the name)test_path_traversal_rejectedpassed
Path traversal rejected (no description in the source; shown from the name)test_absolute_path_rejectedpassed
Absolute path rejected (no description in the source; shown from the name)test_symlink_escape_rejectedpassed
Symlink escape rejected (no description in the source; shown from the name)test_missing_file_and_directory_rejectedpassed
Missing file and directory rejected (no description in the source; shown from the name)test_missing_or_non_string_path_rejectedpassed
Missing or non string path rejected (no description in the source; shown from the name)test_nonexistent_sandbox_root_returns_errorpassed
Nonexistent sandbox root returns error (no description in the source; shown from the name)test_oversize_image_rejected_before_providerpassed
Oversize image rejected before provider (no description in the source; shown from the name)test_empty_file_rejectedpassed
Empty file rejected (no description in the source; shown from the name)test_non_image_with_image_extension_rejectedpassed
Non image with image extension rejected (no description in the source; shown from the name)test_type_not_supported_by_provider_rejectedpassed
Type not supported by provider rejected (no description in the source; shown from the name)test_http_error_becomes_tool_resultpassed
Http error becomes tool result (no description in the source; shown from the name)test_url_error_becomes_tool_resultpassed
Url error becomes tool result (no description in the source; shown from the name)test_response_shape_error_becomes_tool_resultpassed
Response shape error becomes tool result (no description in the source; shown from the name)test_unexpected_provider_exception_becomes_tool_resultpassed
Unexpected provider exception becomes tool result (no description in the source; shown from the name)test_empty_description_becomes_tool_resultpassed
Empty description becomes tool result (no description in the source; shown from the name)test_gemini_builds_real_request_and_parses_textpassed
Gemini builds real request and parses text (no description in the source; shown from the name)test_gemini_no_text_raises_value_errorpassed
Gemini no text raises value error (no description in the source; shown from the name)test_gemini_requires_api_key_and_modelpassed
Gemini requires api key and model (no description in the source; shown from the name)test_anthropic_builds_real_request_and_parses_textpassed
Anthropic builds real request and parses text (no description in the source; shown from the name)test_anthropic_no_text_raises_value_errorpassed
Anthropic no text raises value error (no description in the source; shown from the name)test_anthropic_requires_api_key_and_modelpassed
Anthropic requires api key and model (no description in the source; shown from the name)test_reference_providers_declare_supported_typespassed
Reference providers declare supported types (no description in the source; shown from the name)test_make_vision_tool_schema_and_callpassed
Make vision tool schema and call (no description in the source; shown from the name)test_tool_end_to_end_with_gemini_provider_mocked_networkpassed
Tool end to end with gemini provider mocked network (no description in the source; shown from the name)
test_web_search.py — 15 tests 15 passed, 0 failed, 0 skipped
Tests for ragleap_tools.web_search - SearchProvider implementations, search_web(), and make_web_search_tool(). Uses a fake SearchProvider for the Tool/ToolResult wiring tests (mirrors test_search.py's FakeRagLeap approach), and mocks urllib.request.urlopen directly for the provider-specific request-building tests, so each provider's real payload/header construction is actually exercised, not bypassed.
test_search_web_returns_results_from_providerpassed
Search web returns results from provider (no description in the source; shown from the name)test_search_web_passes_through_query_and_num_resultspassed
Search web passes through query and num results (no description in the source; shown from the name)test_search_web_catches_unexpected_errorspassed
Search web catches unexpected errors (no description in the source; shown from the name)test_make_web_search_tool_returns_bound_toolpassed
Make web search tool returns bound tool (no description in the source; shown from the name)test_make_web_search_tool_has_valid_openai_schemapassed
Make web search tool has valid openai schema (no description in the source; shown from the name)test_make_web_search_tool_has_valid_gemini_schemapassed
Make web search tool has valid gemini schema (no description in the source; shown from the name)test_tavily_provider_builds_correct_requestpassed
Tavily provider builds correct request (no description in the source; shown from the name)test_tavily_provider_handles_empty_resultspassed
Tavily provider handles empty results (no description in the source; shown from the name)test_serper_provider_builds_correct_requestpassed
Serper provider builds correct request (no description in the source; shown from the name)test_serper_provider_handles_empty_resultspassed
Serper provider handles empty results (no description in the source; shown from the name)test_search_web_wraps_network_error_from_real_providerpassed
Search web wraps network error from real provider (no description in the source; shown from the name)test_search_web_clamps_num_results_to_maximumpassed
Search web clamps num results to maximum (no description in the source; shown from the name)test_search_web_clamps_num_results_to_minimumpassed
Search web clamps num results to minimum (no description in the source; shown from the name)test_search_web_coerces_numeric_string_num_resultspassed
Search web coerces numeric string num results (no description in the source; shown from the name)test_search_web_rejects_non_integer_num_results_without_calling_providerpassed
Search web rejects non integer num results without calling provider (no description in the source; shown from the name)