RagLeap
Tests

Tests: ragleap-optimizer

Test files: 6. Test functions: 86. Described by their authors (docstring or @DisplayName): 0. Where there is no description, the line shows the test name in words and says so.

Latest result: ragleap-optimizer-tests (3.11) passed 156 passed, 0 skipped, 0 failed CI job ragleap-optimizer-tests (3.10) passed 156 passed, 0 skipped, 0 failed CI job ragleap-optimizer-tests (3.12) passed 156 passed, 0 skipped, 0 failed CI job

test_cache.py — 18 tests 18 passed, 0 failed, 0 skipped

No file-level description in the source.

  • test_hit_for_same_scope_and_same_request passed
    Hit for same scope and same request (no description in the source; shown from the name)
  • test_no_hit_across_scopes_even_for_a_narrower_scope_of_the_same_tenant passed
    No hit across scopes even for a narrower scope of the same tenant (no description in the source; shown from the name)
  • test_anything_that_can_change_the_answer_is_part_of_the_key passed
    Anything that can change the answer is part of the key (no description in the source; shown from the name)
  • test_key_ignores_dict_key_order passed
    Key ignores dict key order (no description in the source; shown from the name)
  • test_values_are_copied_in_and_out passed
    Values are copied in and out (no description in the source; shown from the name)
  • test_none_is_a_valid_cached_value passed
    None is a valid cached value (no description in the source; shown from the name)
  • test_entries_expire_at_the_ttl passed
    Entries expire at the ttl (no description in the source; shown from the name)
  • test_putting_again_refreshes_the_ttl_and_keeps_one_entry passed
    Putting again refreshes the ttl and keeps one entry (no description in the source; shown from the name)
  • test_least_recently_used_goes_first passed
    Least recently used goes first (no description in the source; shown from the name)
  • test_erase_removes_only_that_scope passed
    Erase removes only that scope (no description in the source; shown from the name)
  • test_erase_after_eviction_and_expiry_stays_consistent passed
    Erase after eviction and expiry stays consistent (no description in the source; shown from the name)
  • test_counters passed
    Counters (no description in the source; shown from the name)
  • test_a_real_scope_is_required passed
    A real scope is required (no description in the source; shown from the name)
  • test_a_request_that_is_not_json_is_refused passed
    A request that is not json is refused (no description in the source; shown from the name)
  • test_bad_ttl_is_refused passed
    Bad ttl is refused (no description in the source; shown from the name)
  • test_bad_max_entries_is_refused passed
    Bad max entries is refused (no description in the source; shown from the name)
  • test_threads_do_not_break_it_or_exceed_the_cap passed
    Threads do not break it or exceed the cap (no description in the source; shown from the name)
  • test_putting_an_entry_again_makes_it_the_most_recent passed
    Putting an entry again makes it the most recent (no description in the source; shown from the name)
test_evaluate.py — 14 tests 14 passed, 0 failed, 0 skipped

No file-level description in the source.

  • test_numbers_match_a_hand_computation passed
    Numbers match a hand computation (no description in the source; shown from the name)
  • test_a_summary_with_enough_cases_shows_the_savings_and_the_interval passed
    A summary with enough cases shows the savings and the interval (no description in the source; shown from the name)
  • test_too_few_cases_gives_no_figures passed
    Too few cases gives no figures (no description in the source; shown from the name)
  • test_no_cases_at_all passed
    No cases at all (no description in the source; shown from the name)
  • test_regressions_are_listed_by_case_index passed
    Regressions are listed by case index (no description in the source; shown from the name)
  • test_improvements_are_not_regressions passed
    Improvements are not regressions (no description in the source; shown from the name)
  • test_failures_are_counted_named_and_left_out passed
    Failures are counted named and left out (no description in the source; shown from the name)
  • test_a_bad_judge_result_counts_as_a_failure passed
    A bad judge result counts as a failure (no description in the source; shown from the name)
  • test_a_judge_may_return_numbers_between_zero_and_one passed
    A judge may return numbers between zero and one (no description in the source; shown from the name)
  • test_lossy_cases_are_counted passed
    Lossy cases are counted (no description in the source; shown from the name)
  • test_the_interval_is_repeatable_for_a_seed_and_brackets_the_difference passed
    The interval is repeatable for a seed and brackets the difference (no description in the source; shown from the name)
  • test_an_invalid_request_in_a_case_is_a_failure_not_a_crash passed
    An invalid request in a case is a failure not a crash (no description in the source; shown from the name)
  • test_bad_arguments_are_refused passed
    Bad arguments are refused (no description in the source; shown from the name)
  • test_the_bootstrap_really_uses_the_given_seed passed
    The bootstrap really uses the given seed (no description in the source; shown from the name)
test_model.py — 3 tests 3 passed, 0 failed, 0 skipped

No file-level description in the source.

  • test_estimate_values passed
    Estimate values (no description in the source; shown from the name)
  • test_content_text_for_strings_lists_and_other_values passed
    Content text for strings lists and other values (no description in the source; shown from the name)
  • test_count_request_counts_roles_messages_tools_and_system passed
    Count request counts roles messages tools and system (no description in the source; shown from the name)
test_optimizer.py — 14 tests 14 passed, 0 failed, 0 skipped

No file-level description in the source.

  • test_report_counts_match_the_counter_and_the_request_is_not_changed passed
    Report counts match the counter and the request is not changed (no description in the source; shown from the name)
  • test_steps_run_in_order_and_each_reports_its_own_tokens passed
    Steps run in order and each reports its own tokens (no description in the source; shown from the name)
  • test_lossy_is_true_only_when_a_lossy_step_really_changed_something passed
    Lossy is true only when a lossy step really changed something (no description in the source; shown from the name)
  • test_a_step_that_claims_lossy_but_changes_nothing_is_not_reported_lossy passed
    A step that claims lossy but changes nothing is not reported lossy (no description in the source; shown from the name)
  • test_a_step_that_makes_the_request_longer_is_discarded_and_reported passed
    A step that makes the request longer is discarded and reported (no description in the source; shown from the name)
  • test_a_lossless_pipeline_never_makes_a_request_longer passed
    A lossless pipeline never makes a request longer (no description in the source; shown from the name)
  • test_custom_counter_is_used passed
    Custom counter is used (no description in the source; shown from the name)
  • test_a_bad_counter_result_is_refused passed
    A bad counter result is refused (no description in the source; shown from the name)
  • test_bad_steps_and_options_are_refused passed
    Bad steps and options are refused (no description in the source; shown from the name)
  • test_bad_requests_are_refused passed
    Bad requests are refused (no description in the source; shown from the name)
  • test_size_and_message_limits passed
    Size and message limits (no description in the source; shown from the name)
  • test_audit_needs_a_scope_and_records_counts_not_text passed
    Audit needs a scope and records counts not text (no description in the source; shown from the name)
  • test_no_audit_means_no_scope_needed passed
    No audit means no scope needed (no description in the source; shown from the name)
  • test_a_step_that_changes_its_input_in_place_cannot_change_the_callers_request passed
    A step that changes its input in place cannot change the callers request (no description in the source; shown from the name)
test_resilience.py — 14 tests 14 passed, 0 failed, 0 skipped

No file-level description in the source.

  • test_retry_succeeds_after_failures_with_doubling_capped_delays passed
    Retry succeeds after failures with doubling capped delays (no description in the source; shown from the name)
  • test_retry_raises_the_last_error_when_attempts_run_out passed
    Retry raises the last error when attempts run out (no description in the source; shown from the name)
  • test_a_single_attempt_is_called_once_and_never_sleeps passed
    A single attempt is called once and never sleeps (no description in the source; shown from the name)
  • test_errors_not_in_retry_on_are_raised_at_once passed
    Errors not in retry on are raised at once (no description in the source; shown from the name)
  • test_keyboard_interrupt_is_never_retried passed
    Keyboard interrupt is never retried (no description in the source; shown from the name)
  • test_the_deadline_stops_retrying_before_waiting_past_it passed
    The deadline stops retrying before waiting past it (no description in the source; shown from the name)
  • test_exactly_at_the_deadline_is_allowed passed
    Exactly at the deadline is allowed (no description in the source; shown from the name)
  • test_bad_retry_arguments_are_refused passed
    Bad retry arguments are refused (no description in the source; shown from the name)
  • test_fallback_returns_the_first_success_and_passes_arguments passed
    Fallback returns the first success and passes arguments (no description in the source; shown from the name)
  • test_fallback_stops_at_the_first_success passed
    Fallback stops at the first success (no description in the source; shown from the name)
  • test_all_failed_keeps_the_causes_in_order_and_hides_their_text passed
    All failed keeps the causes in order and hides their text (no description in the source; shown from the name)
  • test_fallback_raises_errors_outside_retry_on_without_trying_the_next passed
    Fallback raises errors outside retry on without trying the next (no description in the source; shown from the name)
  • test_fallback_needs_callables passed
    Fallback needs callables (no description in the source; shown from the name)
  • test_fallback_validates_retry_on passed
    Fallback validates retry on (no description in the source; shown from the name)
test_steps.py — 23 tests 23 passed, 0 failed, 0 skipped

No file-level description in the source.

  • test_dedupe_removes_earlier_copies_and_keeps_the_last passed
    Dedupe removes earlier copies and keeps the last (no description in the source; shown from the name)
  • test_dedupe_never_touches_system_or_short_messages passed
    Dedupe never touches system or short messages (no description in the source; shown from the name)
  • test_dedupe_keeps_same_text_with_a_different_role passed
    Dedupe keeps same text with a different role (no description in the source; shown from the name)
  • test_dedupe_handles_list_content_and_min_chars passed
    Dedupe handles list content and min chars (no description in the source; shown from the name)
  • test_dedupe_does_not_change_its_input passed
    Dedupe does not change its input (no description in the source; shown from the name)
  • test_dedupe_rejects_bad_min_chars passed
    Dedupe rejects bad min chars (no description in the source; shown from the name)
  • test_trim_keeps_start_and_end_marks_the_cut_and_is_lossy passed
    Trim keeps start and end marks the cut and is lossy (no description in the source; shown from the name)
  • test_trim_marker_counts_the_omitted_characters passed
    Trim marker counts the omitted characters (no description in the source; shown from the name)
  • test_trim_leaves_short_content_and_other_roles_alone passed
    Trim leaves short content and other roles alone (no description in the source; shown from the name)
  • test_trim_does_not_touch_non_string_content passed
    Trim does not touch non string content (no description in the source; shown from the name)
  • test_trim_skips_when_the_marker_would_cost_more_than_it_saves passed
    Trim skips when the marker would cost more than it saves (no description in the source; shown from the name)
  • test_trim_without_tail passed
    Trim without tail (no description in the source; shown from the name)
  • test_trim_rejects_bad_max_tokens passed
    Trim rejects bad max tokens (no description in the source; shown from the name)
  • test_trim_rejects_bad_tail_fraction passed
    Trim rejects bad tail fraction (no description in the source; shown from the name)
  • test_minify_collapses_blank_lines_only_from_three_newlines passed
    Minify collapses blank lines only from three newlines (no description in the source; shown from the name)
  • test_minify_writes_json_compactly_without_changing_the_data passed
    Minify writes json compactly without changing the data (no description in the source; shown from the name)
  • test_minify_leaves_non_json_that_looks_like_json passed
    Minify leaves non json that looks like json (no description in the source; shown from the name)
  • test_minify_ignores_list_content passed
    Minify ignores list content (no description in the source; shown from the name)
  • test_stable_prefix_moves_system_messages_first_and_keeps_other_order passed
    Stable prefix moves system messages first and keeps other order (no description in the source; shown from the name)
  • test_stable_prefix_makes_tool_json_independent_of_key_order passed
    Stable prefix makes tool json independent of key order (no description in the source; shown from the name)
  • test_stable_prefix_tool_order_only_changes_when_asked passed
    Stable prefix tool order only changes when asked (no description in the source; shown from the name)
  • test_stable_prefix_without_tools_is_fine passed
    Stable prefix without tools is fine (no description in the source; shown from the name)
  • test_trim_acts_above_the_cap_and_not_at_it passed
    Trim acts above the cap and not at it (no description in the source; shown from the name)

Compiled by script from the public repository, its CI logs and the GitHub API. To correct something, open an issue.

All tests