Test files: 21. Test functions: 337. 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 (3.10) passed 526 passed, 0 skipped, 0 failed CI job ragleap-tools-tests (3.11) passed 526 passed, 0 skipped, 0 failed CI job ragleap-tools-tests (3.12) passed 526 passed, 0 skipped, 0 failed CI job
test_base_additions.py — 6 tests 6 passed, 0 failed, 0 skipped
v0.5.0 additions to Tool: metadata, to_anthropic_schema, ToolError.
test_four_positional_arguments_still_construct_a_toolpassed
Four positional arguments still construct a tool (no description in the source; shown from the name)test_metadata_defaults_to_an_independent_dictpassed
Metadata defaults to an independent dict (no description in the source; shown from the name)test_metadata_is_stored_as_givenpassed
Metadata is stored as given (no description in the source; shown from the name)test_anthropic_schema_shapepassed
Anthropic schema shape (no description in the source; shown from the name)test_metadata_never_appears_in_provider_schemaspassed
Metadata never appears in provider schemas (no description in the source; shown from the name)test_tool_error_is_an_exception_with_its_messagepassed
Tool error is an exception with its message (no description in the source; shown from the name)
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_governed.py — 61 tests 61 passed, 0 failed, 0 skipped
GovernedToolkit: scope, allowlist, rate limit, approval and audit events.
test_a_toolkit_is_requiredpassed
A toolkit is required (no description in the source; shown from the name)test_allow_for_must_be_callablepassed
Allow for must be callable (no description in the source; shown from the name)test_require_approval_must_be_a_list_of_namespassed
Require approval must be a list of names (no description in the source; shown from the name)test_require_approval_entries_must_be_strings_and_known_toolspassed
Require approval entries must be strings and known tools (no description in the source; shown from the name)test_require_approval_accepts_list_tuple_set_and_frozensetpassed
Require approval accepts list tuple set and frozenset (no description in the source; shown from the name)test_other_options_are_checkedpassed
Other options are checked (no description in the source; shown from the name)test_a_look_alike_or_subclass_of_ratelimit_is_refusedpassed
A look alike or subclass of ratelimit is refused (no description in the source; shown from the name)test_ratelimit_calls_must_be_a_positive_integerpassed
Ratelimit calls must be a positive integer (no description in the source; shown from the name)test_ratelimit_per_seconds_must_be_a_positive_numberpassed
Ratelimit per seconds must be a positive number (no description in the source; shown from the name)test_ratelimit_accepts_ints_and_floats_and_is_frozenpassed
Ratelimit accepts ints and floats and is frozen (no description in the source; shown from the name)test_governance_config_error_is_a_value_errorpassed
Governance config error is a value error (no description in the source; shown from the name)test_fallback_scope_key_and_fieldspassed
Fallback scope key and fields (no description in the source; shown from the name)test_fallback_scope_refuses_bad_partspassed
Fallback scope refuses bad parts (no description in the source; shown from the name)test_fallback_scope_accepts_the_edge_casespassed
Fallback scope accepts the edge cases (no description in the source; shown from the name)test_scope_errors_are_value_errorspassed
Scope errors are value errors (no description in the source; shown from the name)test_the_real_scope_agrees_with_the_fallbackpassed
The real scope agrees with the fallback (no description in the source; shown from the name)test_call_refuses_anything_that_is_not_exactly_a_scope_and_runs_nothingpassed
Call refuses anything that is not exactly a scope and runs nothing (no description in the source; shown from the name)test_an_invalid_scope_is_reported_without_tenant_fieldspassed
An invalid scope is reported without tenant fields (no description in the source; shown from the name)test_an_allowed_tool_runs_like_toolkit_callpassed
An allowed tool runs like toolkit call (no description in the source; shown from the name)test_allow_for_gets_the_scope_and_decides_per_scopepassed
Allow for gets the scope and decides per scope (no description in the source; shown from the name)test_allow_for_may_return_a_list_tuple_set_or_frozensetpassed
Allow for may return a list tuple set or frozenset (no description in the source; shown from the name)test_a_tool_that_is_not_named_is_not_available_and_not_runpassed
A tool that is not named is not available and not run (no description in the source; shown from the name)test_unknown_and_not_allowed_tools_get_the_same_answer_and_eventpassed
Unknown and not allowed tools get the same answer and event (no description in the source; shown from the name)test_a_name_that_allow_for_lists_but_the_toolkit_lacks_is_not_availablepassed
A name that allow for lists but the toolkit lacks is not available (no description in the source; shown from the name)test_a_name_that_is_not_a_string_is_not_availablepassed
A name that is not a string is not available (no description in the source; shown from the name)test_allow_for_returning_anything_else_fails_closedpassed
Allow for returning anything else fails closed (no description in the source; shown from the name)test_allow_for_raising_fails_closed_and_logs_only_the_exception_typepassed
Allow for raising fails closed and logs only the exception type (no description in the source; shown from the name)test_the_empty_allowlist_allows_nothingpassed
The empty allowlist allows nothing (no description in the source; shown from the name)test_calls_over_the_limit_are_refused_and_the_handler_does_not_runpassed
Calls over the limit are refused and the handler does not run (no description in the source; shown from the name)test_the_window_slides_and_a_hit_exactly_one_window_old_is_droppedpassed
The window slides and a hit exactly one window old is dropped (no description in the source; shown from the name)test_refused_calls_do_not_extend_the_windowpassed
Refused calls do not extend the window (no description in the source; shown from the name)test_tenants_have_separate_windows_and_subjects_of_one_tenant_share_onepassed
Tenants have separate windows and subjects of one tenant share one (no description in the source; shown from the name)test_forget_resets_one_tenant_or_all_and_counts_the_windowspassed
Forget resets one tenant or all and counts the windows (no description in the source; shown from the name)test_calls_that_are_refused_before_the_limit_do_not_use_up_quotapassed
Calls that are refused before the limit do not use up quota (no description in the source; shown from the name)test_calls_with_invalid_arguments_do_count_against_the_limitpassed
Calls with invalid arguments do count against the limit (no description in the source; shown from the name)test_without_a_rate_limit_calls_are_unlimitedpassed
Without a rate limit calls are unlimited (no description in the source; shown from the name)test_the_limit_holds_under_concurrent_callspassed
The limit holds under concurrent calls (no description in the source; shown from the name)test_two_governed_toolkits_on_one_toolkit_keep_separate_windowspassed
Two governed toolkits on one toolkit keep separate windows (no description in the source; shown from the name)test_tools_that_need_no_approval_never_call_approvepassed
Tools that need no approval never call approve (no description in the source; shown from the name)test_an_approved_call_runspassed
An approved call runs (no description in the source; shown from the name)test_only_exactly_true_approvespassed
Only exactly true approves (no description in the source; shown from the name)test_an_approve_hook_that_raises_denies_and_logs_only_the_typepassed
An approve hook that raises denies and logs only the type (no description in the source; shown from the name)test_a_tool_that_needs_approval_is_refused_when_no_approve_was_givenpassed
A tool that needs approval is refused when no approve was given (no description in the source; shown from the name)test_approve_gets_the_scope_the_tool_and_the_validated_argumentspassed
Approve gets the scope the tool and the validated arguments (no description in the source; shown from the name)test_arguments_that_fail_validation_never_reach_approvepassed
Arguments that fail validation never reach approve (no description in the source; shown from the name)test_arguments_that_cannot_be_copied_for_approve_are_denied_and_never_raisepassed
Arguments that cannot be copied for approve are denied and never raise (no description in the source; shown from the name)test_approve_cannot_change_what_runs_by_editing_its_copy_of_the_argumentspassed
Approve cannot change what runs by editing its copy of the arguments (no description in the source; shown from the name)test_approve_edits_to_nested_arguments_do_not_reach_the_handler_eitherpassed
Approve edits to nested arguments do not reach the handler either (no description in the source; shown from the name)test_invalid_arguments_return_the_same_failure_toolkit_call_returnspassed
Invalid arguments return the same failure toolkit call returns (no description in the source; shown from the name)test_handler_failures_pass_through_unchangedpassed
Handler failures pass through unchanged (no description in the source; shown from the name)test_null_optional_arguments_are_dropped_before_the_handler_like_toolkit_call_doespassed
Null optional arguments are dropped before the handler like toolkit call does (no description in the source; shown from the name)test_the_wrapped_toolkit_is_not_changedpassed
The wrapped toolkit is not changed (no description in the source; shown from the name)test_with_everything_allowed_and_no_policy_it_matches_toolkit_call_for_known_toolspassed
With everything allowed and no policy it matches toolkit call for known tools (no description in the source; shown from the name)test_every_call_attempt_produces_exactly_one_event_with_these_fieldspassed
Every call attempt produces exactly one event with these fields (no description in the source; shown from the name)test_event_values_for_each_outcomepassed
Event values for each outcome (no description in the source; shown from the name)test_a_failing_event_hook_never_breaks_the_call_and_logs_only_the_typepassed
A failing event hook never breaks the call and logs only the type (no description in the source; shown from the name)test_the_event_is_a_fresh_dict_each_timepassed
The event is a fresh dict each time (no description in the source; shown from the name)test_no_hook_means_no_event_work_and_nothing_is_loggedpassed
No hook means no event work and nothing is logged (no description in the source; shown from the name)test_canary_strings_never_reach_an_event_or_a_refusalpassed
Canary strings never reach an event or a refusal (no description in the source; shown from the name)test_call_never_raises_for_odd_inputpassed
Call never raises for odd input (no description in the source; shown from the name)test_governed_toolkit_is_exported_from_the_packagepassed
Governed toolkit is exported from the package (no description in the source; shown from the name)
test_http.py — 22 tests 22 passed, 0 failed, 0 skipped
Tests for ragleap_tools._http.fetch against a real local HTTP server.
test_defaults_are_the_documented_valuespassed
Defaults are the documented values (no description in the source; shown from the name)test_returns_the_bodypassed
Returns the body (no description in the source; shown from the name)test_exactly_at_the_limit_passes_and_one_over_failspassed
Exactly at the limit passes and one over fails (no description in the source; shown from the name)test_declared_oversize_is_rejected_without_waiting_for_the_bodypassed
Declared oversize is rejected without waiting for the body (no description in the source; shown from the name)test_oversize_with_content_lengthpassed
Oversize with content length (no description in the source; shown from the name)test_oversize_chunked_without_content_lengthpassed
Oversize chunked without content length (no description in the source; shown from the name)test_chunked_body_within_the_limit_is_decodedpassed
Chunked body within the limit is decoded (no description in the source; shown from the name)test_slow_drip_body_hits_the_total_deadlinepassed
Slow drip body hits the total deadline (no description in the source; shown from the name)test_stalled_body_hits_the_deadlinepassed
Stalled body hits the deadline (no description in the source; shown from the name)test_server_that_never_answers_hits_the_deadlinepassed
Server that never answers hits the deadline (no description in the source; shown from the name)test_worker_thread_exits_soon_after_the_deadlinepassed
Worker thread exits soon after the deadline (no description in the source; shown from the name)test_error_types_are_urlerrors_with_readable_textpassed
Error types are urlerrors with readable text (no description in the source; shown from the name)test_http_error_body_is_capped_and_still_readablepassed
Http error body is capped and still readable (no description in the source; shown from the name)test_small_http_error_body_is_preservedpassed
Small http error body is preserved (no description in the source; shown from the name)test_http_error_with_a_dripping_body_hits_the_deadlinepassed
Http error with a dripping body hits the deadline (no description in the source; shown from the name)test_truncated_body_is_reportedpassed
Truncated body is reported (no description in the source; shown from the name)test_connection_refused_is_a_urlerrorpassed
Connection refused is a urlerror (no description in the source; shown from the name)test_other_exceptions_propagate_unchangedpassed
Other exceptions propagate unchanged (no description in the source; shown from the name)test_stand_in_responses_without_a_real_read1_still_workpassed
Stand in responses without a real read1 still work (no description in the source; shown from the name)test_urlopen_gets_the_per_operation_timeoutpassed
Urlopen gets the per operation timeout (no description in the source; shown from the name)test_validate_limits_rejects_bad_valuespassed
Validate limits rejects bad values (no description in the source; shown from the name)test_validate_limits_accepts_the_edgespassed
Validate limits accepts the edges (no description in the source; shown from the name)
test_http_providers.py — 9 tests 9 passed, 0 failed, 0 skipped
End-to-end: every network provider through the real urllib path against a local server. Size cap, total deadline, config validation, per-operation timeout.
test_works_end_to_end_over_real_urllibpassed
Works end to end over real urllib (no description in the source; shown from the name)test_oversized_response_is_a_clean_errorpassed
Oversized response is a clean error (no description in the source; shown from the name)test_slow_drip_returns_at_the_total_deadlinepassed
Slow drip returns at the total deadline (no description in the source; shown from the name)test_configured_limits_are_stored_and_defaults_documentedpassed
Configured limits are stored and defaults documented (no description in the source; shown from the name)test_bad_limits_are_rejected_at_constructionpassed
Bad limits are rejected at construction (no description in the source; shown from the name)test_github_http_error_body_is_still_surfacedpassed
Github http error body is still surfaced (no description in the source; shown from the name)test_github_huge_error_body_is_boundedpassed
Github huge error body is bounded (no description in the source; shown from the name)test_per_operation_timeouts_are_unchangedpassed
Per operation timeouts are unchanged (no description in the source; shown from the name)test_vision_per_operation_timeout_is_unchangedpassed
Vision per operation timeout is unchanged (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_schema_validation.py — 30 tests 30 passed, 0 failed, 0 skipped
validate_arguments / drop_null_optionals: the argument checks that run before a handler.
test_valid_arguments_passpassed
Valid arguments pass (no description in the source; shown from the name)test_missing_required_argument_is_namedpassed
Missing required argument is named (no description in the source; shown from the name)test_unknown_argument_is_rejected_when_properties_are_declaredpassed
Unknown argument is rejected when properties are declared (no description in the source; shown from the name)test_unknown_argument_allowed_when_additional_properties_truepassed
Unknown argument allowed when additional properties true (no description in the source; shown from the name)test_unknown_argument_allowed_when_schema_has_no_propertiespassed
Unknown argument allowed when schema has no properties (no description in the source; shown from the name)test_additional_properties_false_rejects_extras_even_without_propertiespassed
Additional properties false rejects extras even without properties (no description in the source; shown from the name)test_additional_properties_schema_validates_extraspassed
Additional properties schema validates extras (no description in the source; shown from the name)test_wrong_types_are_rejectedpassed
Wrong types are rejected (no description in the source; shown from the name)test_bool_is_not_an_integer_or_numberpassed
Bool is not an integer or number (no description in the source; shown from the name)test_number_accepts_int_and_floatpassed
Number accepts int and float (no description in the source; shown from the name)test_non_finite_numbers_are_rejectedpassed
Non finite numbers are rejected (no description in the source; shown from the name)test_type_list_accepts_any_listed_typepassed
Type list accepts any listed type (no description in the source; shown from the name)test_unknown_schema_type_fails_closedpassed
Unknown schema type fails closed (no description in the source; shown from the name)test_enum_accepts_listed_and_rejects_otherspassed
Enum accepts listed and rejects others (no description in the source; shown from the name)test_enum_does_not_confuse_true_with_onepassed
Enum does not confuse true with one (no description in the source; shown from the name)test_string_length_limitspassed
String length limits (no description in the source; shown from the name)test_numeric_limitspassed
Numeric limits (no description in the source; shown from the name)test_array_limits_and_items_are_checked_with_an_indexpassed
Array limits and items are checked with an index (no description in the source; shown from the name)test_nested_object_required_and_unknown_keyspassed
Nested object required and unknown keys (no description in the source; shown from the name)test_nested_extra_keys_are_allowed_by_defaultpassed
Nested extra keys are allowed by default (no description in the source; shown from the name)test_deep_nesting_returns_an_error_not_a_recursion_errorpassed
Deep nesting returns an error not a recursion error (no description in the source; shown from the name)test_nesting_within_the_limit_is_acceptedpassed
Nesting within the limit is accepted (no description in the source; shown from the name)test_arguments_must_be_a_dictpassed
Arguments must be a dict (no description in the source; shown from the name)test_non_string_argument_names_are_rejectedpassed
Non string argument names are rejected (no description in the source; shown from the name)test_a_non_dict_schema_accepts_any_objectpassed
A non dict schema accepts any object (no description in the source; shown from the name)test_error_text_clips_long_and_control_characterspassed
Error text clips long and control characters (no description in the source; shown from the name)test_keywords_outside_the_subset_are_ignoredpassed
Keywords outside the subset are ignored (no description in the source; shown from the name)test_drop_null_optionals_drops_only_optional_non_null_propertiespassed
Drop null optionals drops only optional non null properties (no description in the source; shown from the name)test_drop_null_optionals_without_properties_is_a_no_oppassed
Drop null optionals without properties is a no op (no description in the source; shown from the name)test_drop_null_optionals_does_not_mutate_the_inputpassed
Drop null optionals does not mutate the input (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_tool_call.py — 4 tests 4 passed, 0 failed, 0 skipped
No file-level description in the source.
test_an_argument_named_self_reaches_the_handlerpassed
An argument named self reaches the handler (no description in the source; shown from the name)test_normal_calls_still_workpassed
Normal calls still work (no description in the source; shown from the name)test_arguments_must_still_be_keywordspassed
Arguments must still be keywords (no description in the source; shown from the name)test_self_is_positional_only_in_the_signaturepassed
Self is positional only in the signature (no description in the source; shown from the name)
test_tool_decorator.py — 25 tests 25 passed, 0 failed, 0 skipped
The @tool decorator: schema generation, definition errors and call behaviour.
test_schema_comes_from_annotations_and_google_docstringpassed
Schema comes from annotations and google docstring (no description in the source; shown from the name)test_name_and_description_overridespassed
Name and description overrides (no description in the source; shown from the name)test_both_decorator_forms_workpassed
Both decorator forms work (no description in the source; shown from the name)test_misuse_of_the_decorator_is_rejectedpassed
Misuse of the decorator is rejected (no description in the source; shown from the name)test_invalid_or_missing_names_are_rejectedpassed
Invalid or missing names are rejected (no description in the source; shown from the name)test_a_description_is_required_and_cappedpassed
A description is required and capped (no description in the source; shown from the name)test_docstring_with_only_sections_needs_an_explicit_descriptionpassed
Docstring with only sections needs an explicit description (no description in the source; shown from the name)test_metadata_is_copied_and_keptpassed
Metadata is copied and kept (no description in the source; shown from the name)test_original_function_is_reachablepassed
Original function is reachable (no description in the source; shown from the name)test_provider_schemas_do_not_carry_metadatapassed
Provider schemas do not carry metadata (no description in the source; shown from the name)test_supported_annotationspassed
Supported annotations (no description in the source; shown from the name)test_pep604_optional_syntaxpassed
Pep604 optional syntax (no description in the source; shown from the name)test_definition_errorspassed
Definition errors (no description in the source; shown from the name)test_success_wraps_the_return_valuepassed
Success wraps the return value (no description in the source; shown from the name)test_a_returned_tool_result_passes_throughpassed
A returned tool result passes through (no description in the source; shown from the name)test_invalid_arguments_never_reach_the_functionpassed
Invalid arguments never reach the function (no description in the source; shown from the name)test_null_for_an_optional_argument_means_omittedpassed
Null for an optional argument means omitted (no description in the source; shown from the name)test_null_for_a_required_argument_is_invalidpassed
Null for a required argument is invalid (no description in the source; shown from the name)test_tool_error_message_reaches_the_model_collapsedpassed
Tool error message reaches the model collapsed (no description in the source; shown from the name)test_tool_error_with_no_message_uses_a_generic_onepassed
Tool error with no message uses a generic one (no description in the source; shown from the name)test_long_tool_error_is_cappedpassed
Long tool error is capped (no description in the source; shown from the name)test_unexpected_exception_exposes_only_the_type_and_is_loggedpassed
Unexpected exception exposes only the type and is logged (no description in the source; shown from the name)test_expose_errors_includes_the_messagepassed
Expose errors includes the message (no description in the source; shown from the name)test_keyboard_interrupt_is_not_swallowedpassed
Keyboard interrupt is not swallowed (no description in the source; shown from the name)test_an_argument_named_self_is_rejected_cleanly_not_with_a_type_errorpassed
An argument named self is rejected cleanly not with a type error (no description in the source; shown from the name)
test_toolkit.py — 31 tests 31 passed, 0 failed, 0 skipped
Toolkit: collection, selection, schema export and safe dispatch.
test_add_chains_and_lists_names_in_orderpassed
Add chains and lists names in order (no description in the source; shown from the name)test_duplicate_names_and_non_tools_are_rejectedpassed
Duplicate names and non tools are rejected (no description in the source; shown from the name)test_select_include_exclude_wherepassed
Select include exclude where (no description in the source; shown from the name)test_select_unknown_names_raise_instead_of_silently_droppingpassed
Select unknown names raise instead of silently dropping (no description in the source; shown from the name)test_select_keeps_the_argument_size_limit_and_returns_a_new_toolkitpassed
Select keeps the argument size limit and returns a new toolkit (no description in the source; shown from the name)test_select_by_metadatapassed
Select by metadata (no description in the source; shown from the name)test_schema_exports_have_the_three_provider_shapespassed
Schema exports have the three provider shapes (no description in the source; shown from the name)test_max_arguments_chars_must_be_a_positive_integerpassed
Max arguments chars must be a positive integer (no description in the source; shown from the name)test_call_with_a_json_string_a_dict_or_nothingpassed
Call with a json string a dict or nothing (no description in the source; shown from the name)test_call_does_not_mutate_the_callers_dictpassed
Call does not mutate the callers dict (no description in the source; shown from the name)test_unknown_tool_names_fail_cleanlypassed
Unknown tool names fail cleanly (no description in the source; shown from the name)test_bad_json_or_non_object_json_fails_without_reaching_the_handlerpassed
Bad json or non object json fails without reaching the handler (no description in the source; shown from the name)test_arguments_of_the_wrong_python_type_failpassed
Arguments of the wrong python type fail (no description in the source; shown from the name)test_non_string_argument_names_failpassed
Non string argument names fail (no description in the source; shown from the name)test_oversize_arguments_fail_before_parsingpassed
Oversize arguments fail before parsing (no description in the source; shown from the name)test_a_json_bomb_fails_cleanlypassed
A json bomb fails cleanly (no description in the source; shown from the name)test_arguments_failing_the_schema_never_reach_the_handlerpassed
Arguments failing the schema never reach the handler (no description in the source; shown from the name)test_missing_required_arguments_failpassed
Missing required arguments fail (no description in the source; shown from the name)test_null_for_an_optional_argument_is_dropped_before_the_handlerpassed
Null for an optional argument is dropped before the handler (no description in the source; shown from the name)test_unexpected_handler_exceptions_are_contained_and_type_onlypassed
Unexpected handler exceptions are contained and type only (no description in the source; shown from the name)test_tool_error_from_a_plain_tool_reaches_the_modelpassed
Tool error from a plain tool reaches the model (no description in the source; shown from the name)test_a_handler_returning_the_wrong_type_is_reportedpassed
A handler returning the wrong type is reported (no description in the source; shown from the name)test_the_handlers_own_result_object_is_returned_unchangedpassed
The handlers own result object is returned unchanged (no description in the source; shown from the name)test_an_argument_named_self_reaches_a_schema_free_toolpassed
An argument named self reaches a schema free tool (no description in the source; shown from the name)test_decorated_tools_work_through_the_toolkitpassed
Decorated tools work through the toolkit (no description in the source; shown from the name)test_every_builtin_tool_has_a_sample_callpassed
Every builtin tool has a sample call (no description in the source; shown from the name)test_builtin_tools_accept_valid_calls_through_the_toolkitpassed
Builtin tools accept valid calls through the toolkit (no description in the source; shown from the name)test_builtin_tools_reject_invalid_calls_without_raisingpassed
Builtin tools reject invalid calls without raising (no description in the source; shown from the name)test_null_optional_arguments_work_for_builtin_toolspassed
Null optional arguments work for builtin tools (no description in the source; shown from the name)test_default_toolkit_is_a_fresh_copy_of_the_stateless_toolspassed
Default toolkit is a fresh copy of the stateless tools (no description in the source; shown from the name)test_the_new_names_are_exportedpassed
The new names are exported (no description in the source; shown from the name)
test_toolkit_prepare_run.py — 20 tests 20 passed, 0 failed, 0 skipped
Toolkit.prepare and Toolkit.run: the two halves of Toolkit.call.
test_prepare_returns_the_registered_tool_and_a_new_arguments_dictpassed
Prepare returns the registered tool and a new arguments dict (no description in the source; shown from the name)test_prepare_accepts_a_json_string_a_dict_or_nothingpassed
Prepare accepts a json string a dict or nothing (no description in the source; shown from the name)test_prepare_never_runs_the_handlerpassed
Prepare never runs the handler (no description in the source; shown from the name)test_prepare_drops_null_optional_arguments_like_call_doespassed
Prepare drops null optional arguments like call does (no description in the source; shown from the name)test_prepare_returns_the_failed_result_call_would_returnpassed
Prepare returns the failed result call would return (no description in the source; shown from the name)test_prepare_reports_a_missing_required_argumentpassed
Prepare reports a missing required argument (no description in the source; shown from the name)test_prepare_enforces_the_size_limit_before_parsingpassed
Prepare enforces the size limit before parsing (no description in the source; shown from the name)test_run_runs_the_handler_with_keyword_argumentspassed
Run runs the handler with keyword arguments (no description in the source; shown from the name)test_run_goes_through_tool_call_like_the_old_call_didpassed
Run goes through tool call like the old call did (no description in the source; shown from the name)test_run_passes_an_argument_literally_named_selfpassed
Run passes an argument literally named self (no description in the source; shown from the name)test_run_turns_tool_error_into_a_failed_result_with_the_messagepassed
Run turns tool error into a failed result with the message (no description in the source; shown from the name)test_run_contains_unexpected_exceptions_and_keeps_the_detail_out_of_the_resultpassed
Run contains unexpected exceptions and keeps the detail out of the result (no description in the source; shown from the name)test_run_fails_cleanly_when_the_handler_returns_something_elsepassed
Run fails cleanly when the handler returns something else (no description in the source; shown from the name)test_run_refuses_a_tool_that_is_not_in_this_toolkit_and_does_not_run_itpassed
Run refuses a tool that is not in this toolkit and does not run it (no description in the source; shown from the name)test_run_refuses_values_that_are_not_toolspassed
Run refuses values that are not tools (no description in the source; shown from the name)test_run_refuses_arguments_that_are_not_a_dictpassed
Run refuses arguments that are not a dict (no description in the source; shown from the name)test_run_refuses_non_string_argument_namespassed
Run refuses non string argument names (no description in the source; shown from the name)test_a_tool_shared_with_a_selected_toolkit_can_be_run_by_eitherpassed
A tool shared with a selected toolkit can be run by either (no description in the source; shown from the name)test_a_tool_renamed_after_it_was_added_still_works_under_its_registered_namepassed
A tool renamed after it was added still works under its registered name (no description in the source; shown from the name)test_call_is_prepare_followed_by_runpassed
Call is prepare followed by run (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)