Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

test: dedupe 7 more redundant tests across 4 files (#4268)

LearningCircuit6008491b7538
diff --git a/tests/advanced_search_system/filters/test_cross_engine_filter_integration.py b/tests/advanced_search_system/filters/test_cross_engine_filter_integration.py
index 6cd7a95229..2f3e5a200f 100644
--- a/tests/advanced_search_system/filters/test_cross_engine_filter_integration.py
+++ b/tests/advanced_search_system/filters/test_cross_engine_filter_integration.py
@@ -16,16 +16,6 @@ from unittest.mock import Mock, patch
class TestCrossEngineFilterSettingsIntegration:
"""Integration tests for CrossEngineFilter settings handling."""
- def test_init_with_explicit_max_results(self):
- """Should use explicit max_results when provided."""
- from local_deep_research.advanced_search_system.filters.cross_engine_filter import (
- CrossEngineFilter,
- )
-
- filter_instance = CrossEngineFilter(model=Mock(), max_results=75)
-
- assert filter_instance.max_results == 75
-
def test_init_with_settings_snapshot_explicit_max(self):
"""Settings snapshot should be passed but explicit max_results takes precedence."""
from local_deep_research.advanced_search_system.filters.cross_engine_filter import (
@@ -294,31 +284,6 @@ class TestCrossEngineFilterResponseFormats:
class TestCrossEngineFilterIndexValidation:
"""Tests for index validation during filtering."""
- def test_out_of_range_indices_ignored(self):
- """Should ignore indices that are out of range."""
- from local_deep_research.advanced_search_system.filters.cross_engine_filter import (
- CrossEngineFilter,
- )
-
- mock_model = Mock()
- # Indices 100 and 999 are out of range for 15 results
- mock_model.invoke.return_value = Mock(content="[0, 100, 1, 999, 2]")
-
- filter_instance = CrossEngineFilter(model=mock_model, max_results=100)
-
- results = [
- {"title": f"Result {i}", "snippet": f"Snippet {i}"}
- for i in range(15)
- ]
-
- filtered = filter_instance.filter_results(results, "test query")
-
- # Only valid indices [0, 1, 2] should be included
- assert len(filtered) == 3
- assert filtered[0]["title"] == "Result 0"
- assert filtered[1]["title"] == "Result 1"
- assert filtered[2]["title"] == "Result 2"
-
def test_negative_indices_in_response(self):
"""Should handle negative indices in response."""
from local_deep_research.advanced_search_system.filters.cross_engine_filter import (
diff --git a/tests/advanced_search_system/filters/test_journal_reputation_coverage.py b/tests/advanced_search_system/filters/test_journal_reputation_coverage.py
index bafa1e73fa..469a09676f 100644
--- a/tests/advanced_search_system/filters/test_journal_reputation_coverage.py
+++ b/tests/advanced_search_system/filters/test_journal_reputation_coverage.py
@@ -364,35 +364,6 @@ class TestScoreJournalUnknown:
# ---------------------------------------------------------------------------
-class TestFilterResultsException:
- """filter_results' safety net must not re-admit predatory sources
- on crash. Returns the predatory-free `filtered` list (possibly
- empty), not the raw input. See S4 in the PR #3081 audit.
- """
-
- def test_exception_returns_predatory_free_safe_list(self):
- filt, _, _ = _make_filter()
-
- with patch.object(
- filt,
- "_JournalReputationFilter__clean_journal_name",
- side_effect=RuntimeError("unexpected"),
- ):
- output = filt.filter_results(
- [
- {"journal_ref": "Test", "title": "A"},
- {"journal_ref": "Test2", "title": "B"},
- ],
- "query",
- )
-
- # The crash fires in Pass-1 before any result is scored, so
- # `filtered` is empty. The previous behavior of returning the
- # raw input would leak predatory sources that Tier 1 had
- # already flagged.
- assert output == []
-
-
# ---------------------------------------------------------------------------
# Tier 4 DOAJ Seal +1 bump
# ---------------------------------------------------------------------------
diff --git a/tests/advanced_search_system/findings/test_findings_repository_coverage.py b/tests/advanced_search_system/findings/test_findings_repository_coverage.py
index 32f343ffec..a6e756bca5 100644
--- a/tests/advanced_search_system/findings/test_findings_repository_coverage.py
+++ b/tests/advanced_search_system/findings/test_findings_repository_coverage.py
@@ -105,36 +105,6 @@ class TestWindowsTimeoutError:
# ---------------------------------------------------------------------------
-class TestUnixTimeoutSuccess:
- """synthesize_findings on Unix: successful LLM invocation."""
-
- def test_unix_success_returns_content_attribute(self):
- """On Unix (default platform in CI), .content is returned."""
- model = MagicMock()
- response = MagicMock()
- response.content = "unix answer"
- model.invoke.return_value = response
-
- repo = _make_repo(model)
- result = repo.synthesize_findings(
- query="q", sub_queries=["sq"], findings=[{"content": "data"}]
- )
-
- assert result == "unix answer"
-
- def test_unix_success_string_response(self):
- """On Unix, a plain string response is converted via str()."""
- model = MagicMock()
- model.invoke.return_value = "unix plain string"
-
- repo = _make_repo(model)
- result = repo.synthesize_findings(
- query="q", sub_queries=[], findings=[{"content": "data"}]
- )
-
- assert "unix plain string" in result
-
-
class TestUnixTimeoutError:
"""synthesize_findings on Unix: LLM times out via SIGALRM."""
diff --git a/tests/advanced_search_system/findings/test_findings_repository_deep_coverage.py b/tests/advanced_search_system/findings/test_findings_repository_deep_coverage.py
index 39b3634d27..dd1c4abd9b 100644
--- a/tests/advanced_search_system/findings/test_findings_repository_deep_coverage.py
+++ b/tests/advanced_search_system/findings/test_findings_repository_deep_coverage.py
@@ -39,22 +39,6 @@ def _make_repo():
class TestFormatLinks:
"""format_links formats a list of link dicts into numbered strings."""
- def test_single_link_formatted(self):
- links = [{"title": "Example", "url": "https://example.com"}]
- result = format_links(links)
- assert "1." in result
- assert "Example" in result
- assert "https://example.com" in result
-
- def test_multiple_links_numbered(self):
- links = [
- {"title": "First", "url": "https://first.com"},
- {"title": "Second", "url": "https://second.com"},
- ]
- result = format_links(links)
- assert "1." in result
- assert "2." in result
-
def test_empty_list_returns_empty_string(self):
assert format_links([]) == ""