RagLeap
Tests

Tests: ragleap-graph

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

Latest result: ragleap-graph-tests passed 101 passed, 7 skipped, 0 failed CI job

test_extraction.py — 42 tests 37 passed, 0 failed, 1 skipped

Tests for ragleap_graph.extraction (v0.2.0).

  • test_extraction_config_defaults_to_regex passed
    Extraction config defaults to regex (no description in the source; shown from the name)
  • test_extraction_config_llm_requires_provider passed
    Extraction config llm requires provider (no description in the source; shown from the name)
  • test_extraction_config_llm_with_provider_succeeds passed
    Extraction config llm with provider succeeds (no description in the source; shown from the name)
  • test_extraction_config_rejects_bad_dedup_threshold passed
    Extraction config rejects bad dedup threshold (no description in the source; shown from the name)
  • test_extraction_config_rejects_bad_max_entities passed
    Extraction config rejects bad max entities (no description in the source; shown from the name)
  • test_dedup_merges_punctuation_variants passed
    Dedup merges punctuation variants (no description in the source; shown from the name)
  • test_dedup_merges_case_and_trailing_punctuation passed
    Dedup merges case and trailing punctuation (no description in the source; shown from the name)
  • test_dedup_default_threshold_does_not_merge_distinct_short_names passed
    Regression test for a real false-positive caught during development:
  • test_dedup_canonical_form_prefers_longer_variant passed
    Dedup canonical form prefers longer variant (no description in the source; shown from the name)
  • test_dedup_empty_input_returns_empty_mapping passed
    Dedup empty input returns empty mapping (no description in the source; shown from the name)
  • test_dedup_rejects_invalid_threshold passed
    Dedup rejects invalid threshold (no description in the source; shown from the name)
  • test_llm_extractor_requires_llm_method passed
    Llm extractor requires llm method (no description in the source; shown from the name)
  • test_llm_extractor_empty_text_returns_empty_without_calling_provider passed
    Llm extractor empty text returns empty without calling provider (no description in the source; shown from the name)
  • test_llm_extractor_parses_native_structured_response passed
    Llm extractor parses native structured response (no description in the source; shown from the name)
  • test_llm_extractor_falls_back_to_parsing_raw_answer passed
    structured_valid can be False even when the provider actually
  • test_llm_extractor_raises_when_all_providers_failed passed
    Llm extractor raises when all providers failed (no description in the source; shown from the name)
  • test_llm_extractor_raises_on_malformed_response passed
    Llm extractor raises on malformed response (no description in the source; shown from the name)
  • test_llm_extractor_deduplicates_repeated_entities_case_insensitively passed
    Llm extractor deduplicates repeated entities case insensitively (no description in the source; shown from the name)
  • test_llm_extractor_respects_max_entities_per_chunk passed
    Llm extractor respects max entities per chunk (no description in the source; shown from the name)
  • test_llm_extractor_passes_domain_terms_into_instruction passed
    Verify domain_terms= actually reaches the prompt sent to the
  • test_live_llm_extraction_roundtrip skipped
    Real end-to-end test: actual Gemini call, actual structured
  • test_extraction_config_extract_relations_requires_llm_method passed
    Extraction config extract relations requires llm method (no description in the source; shown from the name)
  • test_extraction_config_extract_relations_with_llm_method_succeeds passed
    Extraction config extract relations with llm method succeeds (no description in the source; shown from the name)
  • test_relation_extractor_requires_llm_method passed
    Relation extractor requires llm method (no description in the source; shown from the name)
  • test_relation_extractor_skips_llm_call_with_fewer_than_two_entities passed
    A relation needs 2 entities to connect - verify no LLM call
  • test_relation_extractor_parses_valid_relations passed
    Relation extractor parses valid relations (no description in the source; shown from the name)
  • test_relation_extractor_drops_hallucinated_entities passed
    Even though the prompt constrains subject/object to known
  • test_relation_extractor_drops_self_relations passed
    Relation extractor drops self relations (no description in the source; shown from the name)
  • test_ontology_requires_entity_types passed
    Ontology requires entity types (no description in the source; shown from the name)
  • test_ontology_keeps_relation_matching_allowed_types passed
    Ontology keeps relation matching allowed types (no description in the source; shown from the name)
  • test_ontology_drops_relation_violating_allowed_types passed
    Ontology drops relation violating allowed types (no description in the source; shown from the name)
  • test_ontology_leaves_unlisted_relation_types_unconstrained passed
    Ontology leaves unlisted relation types unconstrained (no description in the source; shown from the name)
  • test_relation_extractor_raises_when_all_providers_failed passed
    Relation extractor raises when all providers failed (no description in the source; shown from the name)
  • test_extraction_config_entity_types_defaults_to_none passed
    Extraction config entity types defaults to none (no description in the source; shown from the name)
  • test_llm_extractor_passes_entity_types_into_instruction passed
    Verify entity_types= actually reaches the prompt sent to the
  • test_llm_extractor_still_returns_type_field_from_response passed
    Regression guard: entity_types= guidance must not break the
  • test_llm_extractor_coerces_out_of_vocabulary_type_to_unknown passed
    Regression test for a known limitation: entity_types= was guidance
  • test_llm_extractor_without_entity_types_accepts_any_type passed
    Regression guard: enforcement only applies when entity_types= is
  • test_llm_extractor_coerces_out_of_vocabulary_type_to_unknown passed
    Regression test for a known limitation: entity_types= was guidance
  • test_llm_extractor_without_entity_types_accepts_any_type passed
    Regression guard: enforcement only applies when entity_types= is
  • test_llm_extractor_coerces_out_of_vocabulary_type_to_unknown passed
    Regression test for a known limitation: entity_types= was guidance
  • test_llm_extractor_without_entity_types_accepts_any_type passed
    Regression guard: enforcement only applies when entity_types= is
test_migrations.py — 10 tests 10 passed, 0 failed, 0 skipped

Tests for ragleap_graph.migrations - the schema migration framework. See docs/design/schema-migrations.md for the full design rationale.

  • test_migration_runner_requires_driver passed
    Migration runner requires driver (no description in the source; shown from the name)
  • test_migration_runner_sorts_migrations_by_id passed
    Migration runner sorts migrations by id (no description in the source; shown from the name)
  • test_run_pending_dry_run_reports_without_executing passed
    Run pending dry run reports without executing (no description in the source; shown from the name)
  • test_run_pending_skips_already_applied_migrations passed
    Run pending skips already applied migrations (no description in the source; shown from the name)
  • test_run_pending_applies_pending_migrations_and_records_them passed
    Run pending applies pending migrations and records them (no description in the source; shown from the name)
  • test_run_pending_stops_on_first_failure_and_does_not_continue passed
    Run pending stops on first failure and does not continue (no description in the source; shown from the name)
  • test_status_reports_applied_and_pending passed
    Status reports applied and pending (no description in the source; shown from the name)
  • test_migration_down_default_raises_not_implemented passed
    Migration down default raises not implemented (no description in the source; shown from the name)
  • test_all_migrations_registry_has_unique_sortable_ids passed
    All migrations registry has unique sortable ids (no description in the source; shown from the name)
  • test_migration_runner_live_dry_run_then_apply_is_idempotent passed
    Real end-to-end test against live Neo4j: dry_run reports the real
test_ragleap_graph.py — 45 tests 39 passed, 0 failed, 6 skipped

Tests for ragleap_graph.

  • test_graph_config_defaults passed
    Graph config defaults (no description in the source; shown from the name)
  • test_graph_config_custom_values passed
    Graph config custom values (no description in the source; shown from the name)
  • test_normalize_entity_name_empty passed
    Normalize entity name empty (no description in the source; shown from the name)
  • test_normalize_entity_name_too_short passed
    Normalize entity name too short (no description in the source; shown from the name)
  • test_normalize_entity_name_collapses_whitespace passed
    Normalize entity name collapses whitespace (no description in the source; shown from the name)
  • test_normalize_entity_name_strips_punctuation passed
    Normalize entity name strips punctuation (no description in the source; shown from the name)
  • test_normalize_entity_name_keeps_acronyms_uppercase passed
    Normalize entity name keeps acronyms uppercase (no description in the source; shown from the name)
  • test_normalize_entity_name_title_cases_normal_phrases passed
    Normalize entity name title cases normal phrases (no description in the source; shown from the name)
  • test_normalize_entity_name_truncates_long_names passed
    Normalize entity name truncates long names (no description in the source; shown from the name)
  • test_extract_entities_empty_text passed
    Extract entities empty text (no description in the source; shown from the name)
  • test_extract_entities_finds_acronyms passed
    Extract entities finds acronyms (no description in the source; shown from the name)
  • test_extract_entities_finds_capitalized_phrases passed
    Extract entities finds capitalized phrases (no description in the source; shown from the name)
  • test_extract_entities_respects_max_entities passed
    Extract entities respects max entities (no description in the source; shown from the name)
  • test_extract_entities_deduplicates passed
    Extract entities deduplicates (no description in the source; shown from the name)
  • test_extract_entities_domain_terms_optional_and_off_by_default passed
    A term that only matches via domain_terms shouldn't appear unless
  • test_extract_query_entities_delegates_correctly passed
    Extract query entities delegates correctly (no description in the source; shown from the name)
  • test_extract_query_entities_excludes_sentence_initial_stopwords passed
    Regression test: capitalized question words ("What", "Who", "The", ...)
  • test_max_depth_rejects_non_integer passed
    Max depth rejects non integer (no description in the source; shown from the name)
  • test_max_depth_rejects_too_large passed
    Max depth rejects too large (no description in the source; shown from the name)
  • test_max_depth_rejects_zero_or_negative passed
    Max depth rejects zero or negative (no description in the source; shown from the name)
  • test_max_depth_accepts_valid_range passed
    Max depth accepts valid range (no description in the source; shown from the name)
  • test_health_check_false_without_driver passed
    Health check false without driver (no description in the source; shown from the name)
  • test_upsert_document_returns_error_without_driver passed
    Upsert document returns error without driver (no description in the source; shown from the name)
  • test_find_documents_empty_without_driver passed
    Find documents empty without driver (no description in the source; shown from the name)
  • test_document_entities_empty_without_driver passed
    Document entities empty without driver (no description in the source; shown from the name)
  • test_context_manager_closes_cleanly passed
    Context manager closes cleanly (no description in the source; shown from the name)
  • test_live_full_roundtrip passed
    Real end-to-end test against a real Neo4j instance: connect, write,
  • test_upsert_document_contains_is_actually_idempotent passed
    Regression test for two real bugs found in upsert_document() (v0.5.4):
  • test_relates_as_per_document_contribution_tracking skipped
    Same idempotency fix as test_co_occurs_with_per_document_contribution_tracking,
  • test_cross_chunk_relation_recovers_relation_per_chunk_extraction_misses skipped
    Real regression/proof-of-value test for #154 (cross-chunk relation
  • test_ontology_drops_relation_violating_configured_types skipped
    Real proof-of-value test for #152 (ontology cross-validation). Uses
  • test_co_occurs_with_per_document_contribution_tracking passed
    Regression test for the same idempotency class of bug as CONTAINS
  • test_find_entities_by_type_is_case_insensitive passed
    Regression test for a known limitation: find_entities_by_type()
  • test_find_relations_direction_parameter passed
    Regression test for find_relations(direction=) (v0.5.3). Known
  • test_backfill_user_id_defaults_prevents_duplicate_entities_on_reupsert passed
    Regression test for backfill_user_id_defaults() (v0.6.5). All read
  • test_find_lineage passed
    Regression test for find_lineage() (v0.6.4). Previously the
  • test_collect_entities_for_chunk_regex_path_returns_unknown_type passed
    Regex extraction has no semantic understanding to draw a type
  • test_collect_entities_for_chunk_regex_path_names_match_old_behavior passed
    Regression guard: the set of entity NAMES extracted by the regex
  • test_find_entities_by_type_empty_without_driver passed
    Find entities by type empty without driver (no description in the source; shown from the name)
  • test_find_entities_by_type_empty_string_returns_empty passed
    Find entities by type empty string returns empty (no description in the source; shown from the name)
  • test_audit_logging_records_every_wired_method skipped
    Regression test for audit logging (v0.6.6). Live-verifies against
  • test_concurrent_upsert_same_key_no_duplicates passed
    Regression test for issue #183: concurrent upsert_document() calls
  • test_concurrent_upsert_same_key_relationweight_no_duplicates skipped
    Closes the deferred RelationWeight stress-test gap noted in the
  • test_concurrent_co_occurs_with_different_documents_no_duplicate_relationship passed
    Regression test for the CO_OCCURS_WITH relationship-MERGE race --
  • test_concurrent_relates_as_different_documents_no_duplicate_relationship skipped
    Regression test for the RELATES_AS relationship-MERGE race -- a
test_retrieval.py — 15 tests 15 passed, 0 failed, 0 skipped

Tests for ragleap_graph.retrieval (v0.3.0).

  • test_config_defaults_to_hybrid passed
    Config defaults to hybrid (no description in the source; shown from the name)
  • test_config_rejects_bad_mode passed
    Config rejects bad mode (no description in the source; shown from the name)
  • test_config_rejects_bad_depth passed
    Config rejects bad depth (no description in the source; shown from the name)
  • test_config_rejects_bad_max_graph_results passed
    Config rejects bad max graph results (no description in the source; shown from the name)
  • test_config_rejects_bad_max_query_entities passed
    Config rejects bad max query entities (no description in the source; shown from the name)
  • test_hybrid_mode_combines_chunks_and_graph_context passed
    Hybrid mode combines chunks and graph context (no description in the source; shown from the name)
  • test_hybrid_mode_calls_rag_retrieve_with_correct_args passed
    Hybrid mode calls rag retrieve with correct args (no description in the source; shown from the name)
  • test_hybrid_mode_citations_include_both_chunk_and_graph_path_types passed
    Hybrid mode citations include both chunk and graph path types (no description in the source; shown from the name)
  • test_no_query_entities_skips_graph_calls_but_still_returns_chunks passed
    When the query has no extractable entities, graph lookups are
  • test_graph_only_mode_never_calls_rag_retrieve passed
    Graph only mode never calls rag retrieve (no description in the source; shown from the name)
  • test_graph_only_mode_still_populates_graph_context passed
    Graph only mode still populates graph context (no description in the source; shown from the name)
  • test_graph_expand_depth_and_max_results_passed_through passed
    Graph expand depth and max results passed through (no description in the source; shown from the name)
  • test_namespace_passed_through_to_graph_methods passed
    Namespace passed through to graph methods (no description in the source; shown from the name)
  • test_related_documents_flagged_when_overlapping_vector_chunks passed
    Regression test for a known limitation: GraphRetriever returned
  • test_domain_terms_passed_through_to_extract_query_entities passed
    Domain terms passed through to extract query entities (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